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

Re: `jobs -p` does not behave as documented and required by POSIX



On 20 Dec 2017, at 04:42, Eric Pruitt <eric.pruitt@xxxxxxxxx> wrote:
>think their point is moot though because Z-shell does not claim to be
>POSIX compliant in its default mode. That said, when running Z-shell as
>"sh", the output of `jobs -p` still includes the "extra" information:

Seems this was brought up before (linked from workers/22180); Bart had some
thoughts about it but no action was taken:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=346162

Anyway, as a work-around one can do this:

  kill ${${jobstates#*:*:}%=*}

Or in a script it's probably sufficient most of the time to kill the shell's
entire process group (maybe `-HUP` would be a little nicer):

  kill 0

dana




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