I’m 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ïvely translated as:
while(waitpid() != 0)
;
which hangs. Evidently waitpid returns something other than 0 when there are
no children, but what? The man page wait(2) doesn’t say, nor does it point to
the source for waitpid.--Joel
