Path: utzoo!attcan!uunet!amdahl!kucharsk From: kucharsk@uts.amdahl.com (William Kucharski) Newsgroups: comp.unix.wizards Subject: Re: System V / SIGCLD questions... Message-ID: <17PN02Kq25rs01@amdahl.uts.amdahl.com> Date: 12 May 89 03:37:05 GMT References: <565@lehi3b15.csee.Lehigh.EDU> <17457@mimsy.UUCP> Reply-To: kucharsk@amdahl.uts.amdahl.com (William Kucharski) Organization: Amdahl Coup, UTS Products Hen House Lines: 23 In article <17457@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: (Explanation of SYSV SIGCLD deleted...) >This means that a catcher routine written as > catch() > { > int w, status; > signal(SIGCLD, catch); > w = wait(&status); > } >recurses infinitely as soon as one child exits. Yep. The signal(SIGCLD, catch) has to go _after_ the wait(2), unlike the way you would program a signal handler for "normal" signals... -- William Kucharski ARPA: kucharsk@uts.amdahl.com UUCP: ...!{ames,decwrl,sun,uunet}!amdahl!kucharsk Disclaimer: The opinions expressed above are my own, and may not agree with those of any other sentient being, not to mention those of my employer. So there.