[lsb-discuss] Re: REVIEW: System Initialization
tobias.burnus at physik.fu-berlin.de
Tue Jun 17 10:01:31 PDT 2003
This patch does
- Change "program is stopped" to "program is not running"
for the "status" exit status codes in order to reduce possible
confusion with "SIGSTOP"
- Change the exit status code for "killproc" for the case that the
program is not running:
"0" if no signal is given (= TERM, wait, KILL; this is default use
for "stop" and matches the exit code for "stop")
"not 0" ("7"=program is not running) if a signal (such as HUP) is given
b) Other things that should (probably) be added, but I didn't:
- PID format: If multiple PIDs exists, they should be space separated
in the PID file. (And this should be also the format used by
- killproc should remove the PID file it the program is no longer running.
(This happens with signal KILL, send by default if TERM didn't work.)
A bit clean-up is not bad, especially if the program cannot do anything
PS: For the moment I ignored these issues:
* start_proc: Creation of the PID file
This is related the next item. In general one should assume that
the program creates a PID itself.
* [ 677749 ] Forking of programs which don't detach themself
Debian's start-stop-daemon uses "-b|--background" and SuSE's
startproc/start_daemon does it automatically.
If a program doesn't detach automatically, it probably neither
creates nor deletes a PID file (see above).
* [ 677744 ] the behaviour of start_daemon is currently unclear
Well, in a way this is also a problem for killproc and pidofproc.
The problem is an (e.g. PERL) script which behaves nicely, but
if start_daemon/killproc/pidofproc compares
/proc/`cat $PIDFILE`/exe with $PATHNAME this fails, since
that is a link to e.g. /usr/bin/perl. In this case one has to
check whether /proc/<pid>/cmd starts with $PATHNAME.
* [ 568246 ] Init action: [force-]reload and stopped service
force-reload might (re)start the service,
or it only reloads the currently running service.
That is: If foo is not running and I issue a "foo force-reload",
foo might be running -- or not.
* [ 653167 ] Output from init scripts is described vaguely
* [ 740760 ] $named boot facility confusing
PPS: If WIP goes in, those SF LSB bugs can be marked as fixed:
[ 540950 ] Init script Functions: Several details are unclear
[ 677737 ] Exit status for killproc, start_daemon, pidofproc
[ 677739 ] [Enhancement] pathname for killproc/pidofproc
[ 677745 ] Should a pid file be deleted by killproc
[ 677746 ] [Enhancement] start_daemon should have a PID file argument
[ 677752 ] should-start
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the lsb-discuss