Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!caip!nike!styx!lll-crg!gymble!umcp-cs!seismo!mcvax!ukc!hrc63!nwh From: nwh@hrc63.UUCP (Nigel Holder Marconi) Newsgroups: net.unix-wizards Subject: System V and SIGCLD Message-ID: <344@hrc63.UUCP> Date: Fri, 9-May-86 05:07:52 EDT Article-I.D.: hrc63.344 Posted: Fri May 9 05:07:52 1986 Date-Received: Tue, 13-May-86 01:08:24 EDT Organization: GEC Hirst Research Labs, Wembley, Middlesex. Lines: 27 The problem with resetng SIGCLD is that the signal is still valid since the child process is waiting for the parent to perform a wait. The following implements this and of course works ! trap(sig) int sig; { int c; printf("trapped SIGCLD\n"); wait(&c); signal(SIGCLD, trap); /* reset handler */ } Now that brings me to wait. 4.2 at least provides two flavours of wait : wait and wait3. Now wait3 is new and is free to do what it wants in its own way. Wait however, does not requires an int pointer, it requires a pointer to a union which happens to start with an int. Whether this affects programs written in Sys V flavour or not is probably well defined at the moment, but it could change. Just another example of a transparent difference between flavours that is easily overlooked.