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

Re: zargs with -P intermittently failing in zsh 5.9 and macOS



On Fri, May 27, 2022 at 10:26 AM Jun. T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> I was thinking B is enough, because:
> WIFEXITED: has exited spontaneously
> WIFSIGNALED: has been killed by a signal
> WIFSTOPPED: still alive but now stoeepd
> WIFCONTINUED: has been stopped but now continued
> So these 4 are mutually exclusive.

OK.  However, reading through your patch again ... the changed code
kept track of stopped jobs.  Has that never been necessary?  Perhaps
the right thing to do is to continue recording the state on WIFSTOPPED
but to change to clearing the saved status on WIFCONTINUED?

> Or we can use both B and C, and add a DPUTS() if addbgstatus() is
> called more than once for a single pid.

That would be the "defensive programming" approach.




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