tech-kern archive

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

Re: wait(2) and SIGCHLD



>> They don't vanish, they get reparented to init(8) which then wakes
>> up and reaps them.
> That probably would work, approximately,

Well, it does work, to at least a first approximation.

> but isn't what's supposed to happen when a child's parent is ignoring
> SIGCHLD - the child should skip zombie state, and simply be cleaned
> up.

And how is "reparent to init" not an acceptable means of implementing
that?

> The difference would be detectable if init were sent a SIGSTOP
> (assuming that isn't one which would cause a system panic)

I don't think it would panic, but I think that, if it really does stop
init, it's a bug that it does so.  I thought I'd seen some code that
rendered init immune to SIGKILL and possibly SIGSTOP too (maybe by
forcing them into init's blocked-signals set? I forget).  But I can't
seem to find it now.

> so it would stop reaping children (temporarily) - processes of the
> type in question should not be showing up as zombies.

Right, they shouldn't be.  But init shouldn't be stopped, either.

Similarly, I think it should be impossible to ptrace init, and I have a
fuzzy memory that it was on at least one system I tried it on.

I'll be poking around a bit more.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index