From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <395de4ae6c3cfafa27c79d2734560aa5@plan9.jp> To: 9fans@cse.psu.edu From: Joel Salomon Date: Tue, 7 Nov 2006 20:02:04 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Subject: [9fans] waitpid Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: dcaed4d4-ead1-11e9-9d60-3106f5b1d025 I=E2=80=99m trying to wait for all child processes to finish. The lunix = code my professor gave me for this was: while (wait(&wstat)>0) ; which I na=C3=AFvely translated as: while(waitpid() !=3D 0) ; which hangs. Evidently waitpid returns something other than 0 when there= are no children, but what? The man page wait(2) doesn=E2=80=99t say, no= r does it point to the source for waitpid. --Joel