System V / SIGCLD questions...

William Kucharski kucharsk at uts.amdahl.com
Fri May 12 13:37:05 AEST 1989


In article <17457 at mimsy.UUCP> chris at 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 at 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.



More information about the Comp.unix.wizards mailing list