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

Re: problem with debconf and start-stop-daemon



Previously Henrique de Moraes Holschuh wrote:
> Please tell me one good reason not to use the init.d script interface to
> muck around with daemons _in maintainer scripts_?

The --exec option for start-stop-daemon. This option is very useful: it
gives start-stop-daemon the ability to verify that it is killing the
right process, and not another one with the same name or with the same
(recycled) pid. This is definitely the preferred way of using
start-stop-daemon.

The only problem with the --exec option is that it does not work if
you use it in the postinst after an upgrade to restart the daemon
since the binary has been replaced and will now have a different inode.

This gives you two options:
1. don't use --exec at all, not even in the init script.
2. don't use --exec in the postinst, or use it with a saved (hardlinked)
   copy of the original file

Option 1 means we loose the advantage of being sure we are killing the
right process. Option 2 is obviously better in that it does not have
that problem at all of you use a saved copy, or only during upgrades
if you only don't use --exec in the maintainer script.

Wichert.

-- 
  _________________________________________________________________
 /wichert@wiggy.net         This space intentionally left occupied \
| wichert@deephackmode.org            http://www.liacs.nl/~wichert/ |
| 1024D/2FA3BC2D 576E 100B 518D 2F16 36B0  2805 3CB8 9250 2FA3 BC2D |



Reply to: