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

Re: networking in rcS



According to Wouter Verhelst:
> On Sun, 10 Jun 2001, Miquel van Smoorenburg wrote:
> 
> > In article <[🔎] Pine.LNX.4.21.0106101246320.426-100000@rock.dezevensprong.local>,
> > Wouter Verhelst  <wouter@debian.org> wrote:
> > >"Single user mode" means "only one user is able to log on". If a user is
> > >already logged on via the network and you go to single user mode, that
> > >connection may or may not be closed.
> > 
> > Oh yes, that connection will most definitely be closed.
> 
> How's that?
> 
> Does init kill all running processes when going to single user? (Guess you
> should know, since you wrote it ;-)

Yes. /etc/rc1.d/S20single

> > It sure is. No daemons run in single user mode, so remote access
> > is impossible.
> 
> I'm not sure, but since most daemons spawn another instance of themselves
> to actually handle an incoming connection, wouldn't you say that an
> existing connection could stay alive when the "main" daemon gets killed?

*all* daemons are killed. There's just init running and some kernel
threads. All other processes have been sent to the eternal bitfields.

> It shouldn't (and should go into zombie state), but I've seen situations
> in which "kill -9" to a hung process simply doesn't work

I know of only 2 situations in which that can happen:

1) kernel bug
2) process hung on an NFS mount

> or where a
> zombie process stayed alive for several minutes after its parent got
> killed.

Zombies aren't alive. Zombies are dead. A zombie is a child process
that *still has a parent* but which is dead - however the parent
hasn't wait()ed for it to collect its exit status

A zombie without a parent doesn't exist. Unix 101

> > Say you fscked up the box and bring it to single user mode to fix
> > things, it is very handy (usually essential) to be able to use
> > ftp to access debian packages, to save logfiles, what have you.
> 
> If it's really necessary (which, in this case it is), it's still possible
> to bring up the network manually. I see no need to leave it up.

Yes - what if your box is diskless. Or, /usr is NFS mounted. I don't
see a reason to explicitly bring the network down, it simply makes
no sense.

Mike.



Reply to: