[lkml]   [1996]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Path: not-for-mail
From: Olaf Titz <>
Subject: Occam's Razor on SIGCHLD signal semantics
Message-ID: <>
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.)

___ or @{stud,informatik} ____
__ o <URL:> <IRC:praetorius>
__/<_ >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____

 \ /
  Last update: 2005-03-22 13:37    [W:0.021 / U:2.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site