[lsb-discuss] Re: REVIEW: System Initialization

Thorsten Kukuk kukuk at suse.de
Thu Jun 19 00:47:41 PDT 2003


On Fri, Jun 13, Tobias Burnus wrote:

> > Is this correct, should this be specified somewhere as a clarification?
> > (This matters when the application writes it's pid file and not
> > start_daemon.)
> Should start_daemon ever write the PID into the file? Debian's
> start-stop-daemon does this, for instance, only when --make-pidfile is
> used.

And this is the right way to go. Don't let start_daemon ever write
the PID file, if not requested by the caller. If you have, for
example, a multi threaded application with an own signal handler
thread, the pid file has to contain the PID of this thread, or
linuxthreads will not work correct. start_daemon has no chance to
find out the correct PID. Similar problems will happen with 
applications, which backgrounded itself later.

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk at suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B




More information about the lsb-discuss mailing list