[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

initscripts proposal conflict?



  The init scripts proposal seems to be self-conflicting to
me. sysinit/initactions.sgml says:

"Init files should ensure that they will behave sensibly if invoked
with start when the service is already running, or with stop when it
isn't, and that they don't kill unfortunately-named user
processes. (...)"

  sysinit/initfunctions.sgml defines a algorithm for pidofproc and
killproc that does not seem to comply with this. If the basename.pid
file is not available, it uses pidof to find the running process.
However, pidof(8)'s man page says that it is not safe if all it gets
is the basename of the process (it may return unfortunately-named user
processes otherwise). The usage of ps in case pidof fails is also
broken in the same sense.

  Possible solutions: either require that killproc and pidofproc get a
complete path as an argument, and usage of 'ps' as one of the possible
ways to get the pid of a process is dropped; or define that
start-stop-daemon should be present and use it (I believe s-s-d
doesn't have the problems described).

  Sorry if this has been discussed/is not important enough/is not relevant
now/has been beaten to death.

- gwm
PS: the Description: field doesn't define how i18n should work. Is this
just because no one has sent a patch with a paragraph describing how
i18n should be done?



Reply to: