Added the “no children” return value for waitpid—I’d thought it was 0 and needed to look up the code to find out why my program was hanging. On that note, also added pointers to the code for wait and waitpid, since the current page only points to the syscall interface for await. Notes: Wed Nov 8 11:40:39 EST 2006 geoff implemented, but more concisely. Reference: /n/sources/patch/applied/man-wait Date: Wed Nov 8 01:55:48 CET 2006 Signed-off-by: JoelCSalomon@Gmail.com Reviewed-by: geoff --- /sys/man/2/wait Wed Nov 8 01:53:39 2006 +++ /sys/man/2/wait Wed Nov 8 01:53:39 2006 @@ -68,7 +68,11 @@ and should be freed after use. For programs that only need the pid of the exiting program, .I waitpid -returns just the pid and discards the rest of the information. +returns just the pid and discards the rest of the information; +if there are no children to wait for, +.I waitpid +returns +.BR -1 . .PP The underlying system call is .IR await , @@ -104,6 +108,8 @@ returns .BR -1 . .SH SOURCE +.B /sys/src/libc/9sys/wait.c +.B /sys/src/libc/9sys/waitpid.c .B /sys/src/libc/9syscall .SH "SEE ALSO" .IR fork (2),