]> diplodocus.org Git - flac-archive/commitdiff
(reaper): Why was i passing 0 to waitpid? All the documentation says
authorepg <>
Sun, 29 Aug 2004 23:14:14 +0000 (23:14 +0000)
committerepg <>
Sun, 29 Aug 2004 23:14:14 +0000 (23:14 +0000)
to pass -1.  0 worked on NetBSD 1.6 but hangs on 2.0.  Now pass -1 as
we're supposed to.

fa-flacd

index 064bee6..c3413e5 100755 (executable)
--- a/fa-flacd
+++ b/fa-flacd
@@ -117,7 +117,7 @@ sub flac {
 sub reaper {
     my $pid;
 
-    while (($pid = waitpid(0, WNOHANG)) > 0) {
+    while (($pid = waitpid(-1, WNOHANG)) > 0) {
         push(@finished, [$pid, $?]);
     }