|
From: Leif M. <le...@ta...> - 2005-12-19 06:09:15
|
Donatas,
Oops. Of course. In that case, it is not really possible to do
this reliably within the
sh script without getting complicated. I went ahead and added a new
wrapper.lockfile
property which can be used to create yet another pid like file at an
arbitrary location.
I have attached this new sh script which makes use of this new
functionality. Of
course you will need the new wrapper version to actually make use of
it. This script
should otherwise work file in 3.1.2 however.
Cheers,
Leif
Donatas Ciuksys wrote:
> Hi Leif,
>
> Well I have not tested it but I'm sure start() function in your script will
> not create lock file :) This is why:
>
> ...
> if [ "X$IGNORE_SIGNALS" = "X" ]
> then
> exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF
> wrapper.pidfile=$PIDFILE wrapper.daemonize=TRUE
> else
> exec $CMDNICE $WRAPPER_CMD $WRAPPER_CONF
> wrapper.pidfile=$PIDFILE wrapper.anchorfile=$ANCHORFILE
> wrapper.ignore_signals=TRUE wrapper.daemonize=TRUE
> fi
> touch /var/lock/subsys/$APP_NAME
> ...
>
> It is too late to "touch" because "exec" will never return back to your
> script (I tested it by putting echo command after exec). This is from "bash"
> man pages:
>
> --------------------
> exec [-cl] [-a name] [command [arguments]]
> If command is specified, it replaces the shell. No new
> process
> is created...
> --------------------
>
> So, no other statements after exec will be executed in your script, sorry :)
>
>
> Donatas
>
|