[syslinux] tftpd-hpa and pidfile

Ferenc Wagner wferi at niif.hu
Tue May 19 02:05:40 PDT 2009


Jernej Simončič <jernej.listsonly at ena.si> writes:

> On Monday, May 18, 2009, 23:09:22, Geert Stappers wrote:
>
>> FWIW: 'pidof' is available in Debian.
>
> It's there in Gentoo, too, as a symlink to /sbin/killall5, which is
> part of it's sys-apps/sysvinit-2.86-r10 package.

I'm not sure how to put it, but I think you miss the point, like,
completely.  Pidof (or some other tool) surely can return the pids or
tftpd-hpa processes running some time after starting the daemon, but
how do you tell if any of those is the one the init script started?
By that time, the main process could have forked to service incoming
requests, or even itself could have already died of some fatal error.
The information (daemon pid) is present in the daemon and its parent
only, unless propagated somewhere explicitly (eg. by writing a pid
file).  By the time you execute pidof in your shell script, the parent
(the command executed previously) is already dead, and the daemon is
inaccessible (its pid isn't known by anybody else).  So only these two
are in the position or writing the pid file.  It's more practical to
do so in the daemon, providing a proof of its health at the same time.
-- 
Feri.




More information about the Syslinux mailing list