Thomas Funk <[email protected]> writes:

> 2013/12/5 James Griffin <[email protected]>:
>> I've got a load of functions defined in my configuration file using
>> DestroyFunc/AddToFunc. What I would like to know, is how can use
>> these functions to test if the application in question is already
>> running? In particular, I have an FvwmButtons instance that starts a
>> panel - I wouldn't want more than one instance of this panel
>> running.
>>
>> Any help would be appreciated.
>>
>> Cheers, Jamie.
>>
>
> Try this:
>
> DestroyFunc StartOnce
> AddToFunc   StartOnce
> + I PipeRead 'if [ `ps -ef |grep -v grep |grep -c "$0"` -lt 1 ]; then \
>                 echo Exec $0; \
>               fi'
>
> The only thing is that you've got to set the command in quotes:
> StartOnce "xterm -fg black -bg snow2 -g 80x40 -fn 7x14"

Since I recently ran into issues with quotes which resulted in reading
/bin/ls instead of a configuration file:

I notice that you are using three different types of quotes here.  Is
there some documentation about when to use what kind of quotes?  How do
you test something like this StartOnce function in a save way?


-- 
Debugger entered--Lisp error: (error "No error here")
  signal(error ("No error here"))
  error("No %s here" "error")

Reply via email to