[PATCH] start-stop-daemon: close extra fds on --background

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 1 13:21:51 UTC 2008


On Tuesday 01 July 2008 12:55, Roy Marples wrote:
> On Tuesday 01 July 2008 13:44:52 Denys Vlasenko wrote:
> > On Tuesday 01 July 2008 12:25, Roy Marples wrote:
> > > On Tuesday 01 July 2008 13:01:56 Denys Vlasenko wrote:
> > > > ssd: do not stat -x EXECUTABLE, it is not needed anymore
> > >
> > > Then userland won't catch an error with ssd --background when the file
> > > does not exit :/
> > >
> > > Please re-consider this.
> >
> > With that stat(), even "start-stop-daemon -S -x true" does not work.
> 
> ssd has historically required the full path when starting daemons.

As I see it:

Historically, surprising percentage of Unix admins
have no clue why $PATH is useful. Whenever they meet
a configuration problem causing PATH search to not find their
utility, they "fix" it by using full path.
Whereas correct fix is to fix $PATH or copy/move/symplink
executable to one of the directories which are in $PATH!

That cluelessness is the prime cause why so many scripts
are littered with e.g. "/usr/sbin/sendmail" instead
of just "sendmail".

It is not a matter of aestetics. It is a matter of making your scripts
independent of where executables are stored on this particular machine.

If something can be made to use PATH, it has to use it.
(Case where it is not possible: /sbin/hotplug).
--
vda



More information about the busybox mailing list