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

Re: PATCH (and another bug report): Re: zsh script and SIGCONT



Bart Schaefer wrote:
>Even worse than this ... if you read the script with ". p2", then ^Z only
>stops the "sleep 1" and the loop keeps going.  All three cases ought to
>behave the same as executing the loop at the top-level prompt.

They can't.  A while loop requested in the current shell *can't* be
backgrounded after being started, any more than you could background
a builtin.  The loop has to be able to affect shell variables and so
on, which means it has to execute in tthe shell process.  Of course,
if it's explicitly backgrounded when started, that's a different matter.

-zefram



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