X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=surf.c;h=5043d33c63da44d6c47c356ae87df20af8a518a0;hp=d43535dad78bc9b1177d37fc67db31644777d2a3;hb=7c24c61ab22990ce8dd8158706f11ae7cba77bf0;hpb=890ab510ea2a547926e6814fdcd596910c87d614 diff --git a/surf.c b/surf.c index d43535d..5043d33 100644 --- a/surf.c +++ b/surf.c @@ -259,7 +259,8 @@ sigchld(int unused) { if (signal(SIGCHLD, sigchld) == SIG_ERR) die("Can't install SIGCHLD handler"); - while (0 < waitpid(-1, NULL, WNOHANG)); + while (waitpid(-1, NULL, WNOHANG) > 0) + ; } char *