wait regression in 3800d4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, since commit 3800d49 the wait builtin shows some unexpected
behavior, see http://bugs.debian.org/581425

To reproduce:

 $ dash -c '
 for i in 1 2 3; do
   (sleep $i; echo $i) &
 done
 wait
 echo all done
 sleep 2'
 1
 all done
 2
 3
 $ 

Expected output:
 1
 2
 3
 all done

I don't completely understand commitdiff 3800d49, and didn't find time
to fix the lack of understanding yet, but this patch seems to fix this
specific issue.

Thanks, Gerrit.

diff --git a/src/jobs.c b/src/jobs.c
index a4fada0..57c0854 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -1136,8 +1136,6 @@ waitproc(int block, int *status)
                if (err || !block)
                        break;
 
-               block = 0;
-
                sigfillset(&mask);
                sigprocmask(SIG_SETMASK, &mask, &oldmask);
 

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux