This problem is reproducible in bug 174236. Init script itself calls start-stop-daemon both for start and for stop which works fine for rwhod, so this works fine (exit status 0 in both cases): camobap ~ # start-stop-daemon --start --quiet --exec /usr/sbin/rwhod -- -b camobap ~ # start-stop-daemon --stop --quiet --name rwhod On the other hand /etc/init.d/rwho stop fails. IIUC init script instead of s-s-d calls rc_stop_daemon (from rc-daemon.sh) which attempts to stop the process. While it detect ${pids} correctly (see code, for quick reference: for pid in ${pids}; do [snip] if rc_kill_pid "${pid}" false ; then # Remove the pidfile if the process didn't [[ -f ${pidfile} ]] && rm -f "${pidfile}" else retval=1 fi [snip] done ), first it tries to kill the child which enters <defunct> state and does not die: root 5043 0.0 0.0 1744 444 ? Ss 23:50 0:00 rwhod -b root 5044 0.0 0.0 0 0 ? Z 23:50 0:00 [rwhod] <defunct> and thus rc_kill_pid returns false and retval became equal to 1 and stop fails. So the question here is, how to force baselayout use s-s-d? Or may be it's better to fix rc_stop_daemon logic?
Yeah, we've totally changed this handling for baselayout-2. I'm not really interested adding corner case fixes to baselayout-1 at this time. The workaround is to call the s-s-d binary by path in the init script.