[emstar-design] fusdd and a pid file...
Martin
mlukac@CS.UCLA.EDU
Mon, 10 Jan 2005 23:16:59 -0800
So. I put in the few lines of changes to do this... then I decided to
read the man page for start-stop-deamon again _really_ closely, and
play with it for a few more minutes.
Turns out to fix the problem (i.e. make start-stop-deamon be actually
able to stop fusdd and be able to remove the killall fusdd) in the
init script fusd/initscripts/fusdd-debian, all I had to do was remove
the --pidfile /var/run/$NAME.pid flag from the stop) case. Not
specifying a pid file tells the start-stop-damon to just hunt down
anything that looks like the arg for --exec and kill it (we could also
use --name I believe). So... fusdd does not need to create a pid file.
I won't commit my changes (only the fix) to help keep out useless
code.
M.
On Tue, Jan 04, 2005 at 10:20:00AM -0800, Martin wrote:
>
> Hi!
>
> Would anyone be terribly upset if I added code to fusdd that would
> check try to create a /var/run/fusdd.pid ... or event something like
> /tmp/fusdd.pid that contained the pid of fusdd?
>
> The reason is that running fusdd with the pretty standard
> start-stop-daemon doesn't really work, since it daemonizes itself and
> as far as I can tell start-stop-deamon can not keep track of
> this. This means that start-stop-deamon can not properly stop fusdd.
>
> I would do it so there would be no errors or anything visible if it
> can not. Maybe I could do it as a command line parameter, telling
> fusdd to actually put a pid file somewhere?
>
> I'm, not sure how this would work with fusdd_net, since that is also
> forked from the main process.
>
> M.
> _______________________________________________
> emstar-design mailing list
> emstar-design@cens.ucla.edu
> http://www.cens.ucla.edu/mailman/listinfo/emstar-design