Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!axiom!drilex!rclex!enmasse!keith From: keith@enmasse.UUCP (Keith Crews) Newsgroups: net.unix-wizards Subject: Re: System V and SIGCLD Message-ID: <283@enmasse.UUCP> Date: Fri, 9-May-86 10:45:30 EDT Article-I.D.: enmasse.283 Posted: Fri May 9 10:45:30 1986 Date-Received: Sat, 10-May-86 23:58:45 EDT References: <709@cheviot.uucp> Reply-To: keith@enmasse.UUCP (Keith Crews) Organization: EnMasse Computer Corp, Acton, MA Lines: 20 In article <709@cheviot.uucp> lindsay@cheviot.newcastle.ac.uk (Lindsay F. Marshall) writes: >The following code goes into an infinite loop on System V :- > > >The problem is that resetting the SIGCLD trap inside the handler causes the >signal to be raised again and the handler to be re-entered...... This >is not documented in the manual page and seems to me to be a bug as if you >do not reset the handler the system seems to set it to SIG_DFL, meaning that >you will loose any SIGCLD signals between the handler's exit and your getting >a chance to call signal again. Anyone have any thoughts, information etc. on >this problem?? The signal is raised again because the child still exists. To do what you want you have to do a wait in the signal handler before resetting the signal. This explaination is due to a fellow employee - any errors in conveying it are no doubt due to me. In my system V manual there is a discussion of what happens to SIGCLD while the signal catcher is executing, but it does not seem to imply this behavior. Keith Crews