must not hang if process doesn't exist, and we don't have an existing wait message for it. Reference: /n/atom/patch/applied2013/apewait4gone Date: Tue Sep 17 16:05:42 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/ape/lib/ap/plan9/wait.c Tue Sep 17 16:05:26 2013 +++ /sys/src/ape/lib/ap/plan9/wait.c Tue Sep 17 16:05:26 2013 @@ -123,7 +123,7 @@ if(options & WNOHANG){ snprintf(pname, sizeof(pname), "/proc/%d/wait", getpid()); d = _dirstat(pname); - if(d != nil && d->length == 0){ + if(d == nil || d->length == 0){ free(d); return 0; }