Source-Changes archive

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

Re: CVS commit: src/usr.sbin/rtsold



> >     no consideration to multiple daemons,
> 
>      void
>      pidfile(const char *basename);
> 
> DESCRIPTION
>      pidfile() writes a file containing the process ID of the program to the
>      /var/run directory.  The file name has the form /var/run/basename.pid.
>      If the basename argument is NULL, pidfile will determine the program name
>      and use that instead.
> 
> Seems, like the "multiple daemons" case is already taken care of in the
> interface.  Just specify a unique "basename" argument for each of the
> daemons.

        s/multiple daemons/multiple running instance of the same daemon/

> >     no consistency guarantee between actual process table,
> Am I supposed to believe this is a widespread and serious problem in
> practice?  If so, I must have been hallucinating the last 20 years of
> using Unix.

        you may kill random victim if dangling /var/run/foo.pid stays.

> >     if anything, a script that searches and kills
> >     "rtsold" would be much better.  or, we could extend kill(1) to take
> >     string as an argument and kill process under given name.
> 
> Actual ps(1) output would look like this:
> 
> root     146  0.0  1.0 1596  1248 ??  Ss   Thu12PM  0:03.18 /usr/sbin/rtsold
> root     183  0.0  1.0 1596  1248 ??  Ss   Thu12PM  0:03.18 /usr/sbin/rtsold
> 
> Please explain to me, how an extension to kill(1) would help to distinguish
> between the two rtsolds and signalling only to correct one.  You answer
> should take into account that certain signals are not catchable and how
> correct operation is garaunteed in that case.

        given that /var/run/foo.pid method works only if there's only
        one running instance of the same daemon, why do i need to bother
        with the above example? (with two rtsold)

itojun



Home | Main Index | Thread Index | Old Index