Kill(2) Man page bug? Vax and Sun

P. Tucker Withington ptw at encore.UUCP
Fri Mar 28 04:06:33 AEST 1986


The kill(2) man page in both 4.2bsd and Sun Release 2.0 states:

	If the process number is 0, the signal is sent to *all other*
	processes in the sender's process group; this is a variant of
	killpg(2).  (emphasis mine)

Maybe I'm expecting too much of the English language, but I interpret
this statement to mean: whereas killpg sends to everyone in a process
group, you can use kill to send to everyone except yourself (obviating
a signal/SIGIGNORE call).

The following test program demonstrates that this is not how kill is
implemented:

	main() {
		kill(0, SIGQUIT);
	}

causes a core dump of itself.

I don't have my historical manuals in front of me, so I can't say when
this language was introduced to the kill(2) man page, but it clearly
diverges from the System V man page and the Sun and Vax
implementations.  I always have assumed kill(0, ...) does what it does
and am puzzled by the propagation of the wording in the man page.  Is
it just sloppy English, or did someone actually think this was a
useful feature and document it but never implement it?  I expect a
number of things would break if kill actually did what I interpret the
man page to say it does.

			o.o	--ptw
			 ~



More information about the Comp.bugs.4bsd.ucb-fixes mailing list