[comp.unix.wizards] Sending Signals to Zombies

rbj@uunet.UU.NET (Root Boy Jim) (04/25/91)

There seems to be a cultural difference (BSD vs SV) on the
meaning of sending signals to zombie processes; System V
allows it while BSD does not.

To my mind, the operation seems meaningless; however, I can
see reasons (altho not very good ones) for either choice.
And it is bound to happen in practice, so a behavior
must be specified, even if it is undefined.

What does POSIX say about this, and what are some of the issues?
-- 
		[rbj@uunet 1] stty sane
		unknown mode: sane

richard@locus.com (Richard M. Mathews) (04/26/91)

rbj@uunet.UU.NET (Root Boy Jim) writes:

>There seems to be a cultural difference (BSD vs SV) on the
>meaning of sending signals to zombie processes; System V
>allows it while BSD does not.

>What does POSIX say about this, and what are some of the issues?

The most direct statement in POSIX on this is in the rationale rather
than the standard itself; so to make life easy, I'll just quote that.

	In B.3.3.2:
	Existing implementations vary on the result of a kill()
	with pid indicating an inactive process (a terminated
	process that has not yet been waited for by its parent)....
	Since this standard's definition of _process_lifetime_
	covers inactive processes, the [ESRCH] error as described
	is inappropriate in this case.  In particular this means
	that an application cannot have a parent process check
	for termination of a particular child with kill()....
	this can be done reliably with waitpid().

BSD will have to change to become conformant in this regard.

Richard M. Mathews			Lietuva laisva = Free Lithuania
richard@locus.com			Brivu Latviju  = Free Latvia
lcc!richard@seas.ucla.edu		Eesti vabaks   = Free Estonia
...!{uunet|ucla-se|turnkey}!lcc!richard