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

Re: 5.0.8 regression when waiting for suspended jobs



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> 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

TBH I don't know the best behavior here, but it's not endlessly
looping spewing messages.  :)

> bash-4.2.25
>  - "wait $!" returns immediately
>  - "wait %1" returns immediately
>  - "wait" returns immediately
>
> ksh93 (2011)
>  - "wait $!" blocks
>  - "wait %1" blocks
>  - "wait" blocks

I found it surprising that pid and jobid behave differently, but if
that's for historical reasons, I'm fine with that.

-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



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