Source-Changes archive

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

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



> On Sun, Jan 04, 2004 at 08:56:07AM +0900, Jun-ichiro itojun Hagino wrote:
> > > >         no consideration to multiple daemons,
> > >      void
> > >      pidfile(const char *basename);
> > > 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/
> 
> Yes, that's what I assumed you mean, because the other case of multiple
> daemons with different names is known to work.
> 
> That's what the "basename" argument is intended for, to be used by multiple
> instances of the same daemon so that each one gives a unique pidfile.
> 
> E.g. from the /var/run of one of my machines:
> 
> lfs_cleanerd:m:|u|3.pid
> lfs_cleanerd:s:|u|3.pid
> 
> pppd manages the pidfiles correctly, too.  Others have command line options
> to select a unique pidfile.

        well, as far as i see the only program that passes non-NULL in usr.sbin
        is wsmoused.   anyways, i know the meaning of pidfile() argument
        well enough, no need for description.  the question is, even if
        lfs_cleanerd creates multiple pid file like above, how can a user know
        which file to use?  

> > > > 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)
> 
> Well, you claimed your scheme would solve the above example without pidfiles.
> If you can't show that it does, we have to assume that, in fact, it
> doesn't.
> 
> However, your claim that the pidfile method doesn't work with multiple
> instances of the same daemon is not only false, it is at odds with reality.
> There are multiple daemons in NetBSD that manage multiple pid files for
> multiple instances just fine.  See above for examples. 

        did i say that i have solved the problem that was not solved with
        pidfile?  i have been saying that pidfile() call is not really useful,
        and there's alternative way to do the same thing.

        for intsance, with two rtsold situation, how would you create pid files?
        you do not have solution either, and i have never said that i have
        solved the problem with my proposal.  you are reading between lines
        too much.


        what i dislike about netbsd is that amount of (usually useless)
        discussion email is much more than the actual improvement in code.
        i don't think it is productive.  therefore it would be the last email
        on this topic from me.

itojun



Home | Main Index | Thread Index | Old Index