Re: why two process?

From: Clifton Royston <cliftonr@dont-contact.us>
Date: Tue, 21 Dec 1999 07:52:29 -1000

On Tue, Dec 21, 1999 at 01:43:31PM +0100, Olivier Daury wrote:
> Kendall Lister wrote:
> > On Tue, 21 Dec 1999, wangfei wrote:
> > > I have downed squid.src.2.2stable5 and make it successfully. But when
> > > i type squid and ps ,there are two squid process. One owner is root
> > > and the other is nobody. how does this happen? Is it necessary?
> >
> > We see the following when we run Squid:
> >
> > root 17754 0.0 1.0 2516 672 ? S 09:40 0:00 /usr/squid/bin/squid
> > squid 17755 0.7 49.7 32364 31596 ? S 09:40 5:59 (squid)
> >
> > If this is what you see, then you're probably doing the right thing.
> I have also 2 process, but why there is two process ?

This is a common practice for daemons, or anything that people consider
it important to keep running without human intervention. The second
process does all the work. The first process does essentially nothing
(note the 0 CPU time) but watch over the second process and restart it
if it crashes.

Since it's much easier to write a non-buggy program if it has to do
almost nothing, the first process is much less likely to crash, and so
will be there if Squid crashes periodically due to some obscure error.

  -- Clifton

-- 
 Clifton Royston  --  LavaNet Systems Architect --  cliftonr@lava.net
        "An absolute monarch would be absolutely wise and good.  
           But no man is strong enough to have no interest.  
             Therefore the best king would be Pure Chance.  
              It is Pure Chance that rules the Universe; 
          therefore, and only therefore, life is good." - AC
Received on Tue Dec 21 1999 - 11:00:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:50:04 MST