DASH Shell discussions
 help / color / mirror / Atom feed
* wait regression in 3800d4
@ 2010-05-19 19:08 Gerrit Pape
  2010-05-22 21:28 ` Jilles Tjoelker
  0 siblings, 1 reply; 3+ messages in thread
From: Gerrit Pape @ 2010-05-19 19:08 UTC (permalink / raw)
  To: dash

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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-27 11:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 19:08 wait regression in 3800d4 Gerrit Pape
2010-05-22 21:28 ` Jilles Tjoelker
2010-05-27 11:39   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox