Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!gargoyle!att!chinet!mcdchg!usenet From: abcscnge@csuna.UUCP (Scott Neugroschl) Newsgroups: comp.unix Subject: Re: Children's exit() status Keywords: UNIX SVR3.1 fork() exec() exit() signal() Message-ID: <7966@mcdchg.UUCP> Date: 20 May 88 15:44:25 GMT References: <4626@mcdchg.UUCP> Sender: usenet@mcdchg.UUCP Organization: California State University, Northridge Lines: 33 Approved: usenet@mcdchg.UUCP In article <4626@mcdchg.UUCP> lenb@houxs.UUCP writes: > The question is, is it possible that my program > be woken up only 20 times, for 30 children. Ie. could I miss > child deaths because several occur "simultaneously". (simultaneously > As I understand it, wait() returns the PID of one child. Therefore, you should not get signals from the two children. Another possibility: nice() the children, so that the parent has a higher priority than the child tasks. i.e.: for (i = 0 ; i < NUM_PROCS ; i++) { if ((pid = fork()) == -1) { /* BAD FORK() */ } else if (pid == 0) /* child process */ { nice(5); /* lower my priority */ } else { /* do parent process stuff */ } } Just some thoughts... -- Scott "The Pseudo-Hacker" Neugroschl UUCP: {litvax,humboldt,sdcrdcf,rdlvax,ttidca,}\_ csun!abcscnge {psivax,csustan,nsc-sca,trwspf }/ -- "They also surf who stand on waves"