[comp.unix.questions] Does a zombie have a "valid pid"

brnstnd@stealth.acf.nyu.edu (05/25/90)

In article <1990May25.001614.23294@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes:
> In article <639@mecky.UUCP>, walter@mecky.UUCP (Walter Mecky) writes:
> |> I think, a process in zombie state has no "valid pid" and kill(2) should
> |> return -1. Am I wrong ?
>   Yes.  A zombie process is still a process, even if it's in a weird
> state.  As long as that's true, it's still going to have a PID
> associated with it, and therefore signals sent to it are going to work.

You're correct up to the last phrase. Signals sent to it aren't going to
``work,'' in the sense that they won't invoke the usual signal handler;
QUIT won't dump a zombie. They'll be delivered, but they won't work.

---Dan

jik@athena.mit.edu (Jonathan I. Kamens) (05/26/90)

In article <14276:May2508:53:0790@stealth.acf.nyu.edu>,
brnstnd@stealth.acf.nyu.edu writes:
|> In article <1990May25.001614.23294@athena.mit.edu> jik@athena.mit.edu 
|> (Jonathan I. Kamens) writes:
|> >   Yes.  A zombie process is still a process, even if it's in a weird
|> > state.  As long as that's true, it's still going to have a PID
|> > associated with it, and therefore signals sent to it are going to work.
|> 
|> You're correct up to the last phrase. Signals sent to it aren't going to
|> ``work,'' in the sense that they won't invoke the usual signal handler;
|> QUIT won't dump a zombie. They'll be delivered, but they won't work.

  It's a matter of semantics; I stand by what I said, because I meant
the same thing you did.

  The original poster said that he thought a kill(2) sent to a zombie
process should return -1 (meaning that it "shouldn't work").  I replied
that that's incorrect -- signals sent to a zombie process will "work",
at least from the sender's point of view.

  Perhaps I should have said, "... and therefore sending signals to it
is still going to work."

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

gwyn@smoke.BRL.MIL (Doug Gwyn) (05/26/90)

In article <1990May25.181610.2342@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes:
>In article <14276:May2508:53:0790@stealth.acf.nyu.edu>,
>brnstnd@stealth.acf.nyu.edu writes:
>|> ... They'll be delivered, but they won't work.
>  It's a matter of semantics; I stand by what I said, because I meant
>the same thing you did.

I'm surprised you didn't point out that he also got it wrong.
The signals are successfully posted but not never delivered.

brnstnd@stealth.acf.nyu.edu (05/28/90)

In article <13004@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes:
> In article <1990May25.181610.2342@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes:
> > In article <14276:May2508:53:0790@stealth.acf.nyu.edu>,
> > brnstnd@stealth.acf.nyu.edu writes:
> > |> ... They'll be delivered, but they won't work.
> > It's a matter of semantics; I stand by what I said, because I meant
> > the same thing you did.
> I'm surprised you didn't point out that he also got it wrong.
> The signals are successfully posted but not never delivered.

It's a matter of semantics; I stand by what I said, because I meant the
same thing you did. :-) Actually, to match the terminology in the man
pages (rather than anyone's particlar kernel), the signals are *sent*
but never delivered.

---Dan