Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 5.0.8 regression when waiting for suspended jobs



On Jul 31, 10:30am, Christian Neukirchen wrote:
}
} > Also if you wait by job number ("wait %1") instead, "wait" returns right
} > away rather than blocking on the stopped job (in both .7 and .8).
} 
} Can confirm.  Why would it be different when giving the PID...

Comparison:

zsh-5.0.7
 - "wait $!" blocks (looping on repeated wait3() nonzero)
 - "wait %1" returns immediately
 - "wait" returns immediately

zsh-5.0.8
 - "wait $!" loops but also printing status every time
 - "wait %1" returns immediately
 - "wait" returns immediately

bash-4.2.25
 - "wait $!" returns immediately
 - "wait %1" returns immediately
 - "wait" returns immediately

ksh93 (2011)
 - "wait $!" blocks
 - "wait %1" blocks
 - "wait" blocks

There's an additional interesting thing about ksh.  If you interrupt
either of "wait $!" or "wait %1", ksh sends the signal along to the
job that was waited for.  Neither bash nor zsh do so (bash can't as
wait has already returned).



Messages sorted by: Reverse Date, Date, Thread, Author