Re: Distributions with 2.0 yet?

Olaf Titz (olaf@bigred.inka.de)
Fri, 21 Jun 96 11:49 +0200


Newsgroups: linux.dev.kernel
Path: not-for-mail
From: Olaf Titz <olaf@bigred.inka.de>
Subject: Occam's Razor on SIGCHLD signal semantics
Message-ID: <dtcgn1.6aj@bigred.inka.de>
Date: 21 Jun 1996 11:49:45 +0200
Organization: private Linux site, southern Germany
Lines: 33

With all the talk about what's POSIX and what's System V compatible
wrt. signal(SIGCHLD, SIG_IGN) let me throw in a suggestion:

System V behaviour is broken because it violates the least surprise
principle and adds an exception. More, it is not logical. Default
behaviour for SIGCHLD is to not kill the process and to not call any
routine, in other words, "ignore". Setting a signal handler to SIG_IGN
while it is yet ignored should cause to get the child to be "more
ignored than ignored"? Ouch.

Just because a program which misses to install a SIGCHLD handler is
throwing zombies doesn't mean you have to fix this application by
installing a kludge in the kernel. This is precisely what System V has
done more than once and the Linux people are always arguing _against_.
It's dead easy to add an ignoring signal handler to a program that
needs it, just as with the "one shot" versus "restart" situation.
You know that when compiling old programs, signal handlers are one
thing you have to look at anyway.

Wasn't the original SysV signal named SIGCLD instead of SIGCHLD?
Perhaps we should regard the alias in <signal.h> (of GNU vintage) as
bogus and delete it, so the chance goes up that a program that expects
the "double ignore" behaviour is caught at compile time... :-)
(Btw.: if anyone knows, does the GNU libc info file, which heavily
leans on POSIX, accurately describe Linux signal behaviour?
But not another GNU libc flamefest, please.)

olaf

-- 
___        Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de       ____
__ o           <URL:http://www.inka.de/~bigred/>     <IRC:praetorius>
__/<_              >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____