System V and SIGCLD

M.J.Shannon mjs at sfsup.UUCP
Mon May 19 23:04:07 AEST 1986


In article <709 at cheviot.uucp> lindsay at cheviot.newcastle.ac.uk (Lindsay F. Marshall) writes:
>The following code goes into an infinite loop on System V :-
>
>	trap(sig)
>	int sig;
>	{

		/* add something like this: */
		int pid = wait(0);
		/* and you won't get the signal until the next child exits */

>		printf("trapped SIGCLD\n");
>		signal(SIGCLD, trap);	/* reset handler */
>	}
>
>Lindsay F. Marshall, Computing Lab., U of Newcastle upon Tyne, Tyne & Wear, UK
-- 
	Marty Shannon
UUCP:	ihnp4!attunix!mjs
Phone:	+1 (201) 522 6063

Disclaimer: I speak for no one.

"If I never loved, I never would have cried." -- Simon & Garfunkel



More information about the Comp.unix.wizards mailing list