[lsb-discuss] Re: REVIEW: System Initialization

Mark Hatle fray at mvista.com
Wed Jun 18 15:46:49 PDT 2003

Tobias Burnus wrote:
> Hi,
> On Fri, 13 Jun 2003, Mark Hatle wrote:
>>>Should start_daemon ever write the PID into the file? Debian's
>>>start-stop-daemon does this, for instance, only when --make-pidfile is
>>So this is a good question, should start_daemon be populating PID files?
>>  My immediate answer is yes it should be, if the user doesn't want that
>>behavior they should manually launch their app and manage their pidfile.
>>  But I havn't checked any other distributions to see if that is happening.
> My immediate answer is no, it shouldn't. Usually one can expect from the
> application that it should write the PID themself. Especially if a program
> forks, it is more cumbersome for start_daemon than for the program itself.
> For programs that don't automatically background themself, it makes sense,
> though.

Ok.. what do we do for programs that don't automatically background..

I am assuming start_daemon will background the app automagically..  if 
it isn't supposed to, then I'm at the point of wondering what the 
purpose of start_daemon actually is.

Ok, now assuming start_daemon backgrounds, how do I get the pid(s) from 
start_daemon, to store in the pidfile for a later kill operation.. :)

This chain of events is what brought be to the whole start_daemon should 
write to the pid (and background..)  I'll definatly admit those are poor 
assumptions on my part, but if I read it that way on first glance.. I'm 
sure others will.


More information about the lsb-discuss mailing list