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

Re: PATCH: compdump (Re: Test hanger disappeared, but ...)



Sven wrote:
> That's interesting... For example, with
> 
>   while true; do echo > unwritable; sleep 1; done
> 
> zsh stops after the first attempt. bash and ksh don't stop and the
> /bin/sh here stops after the first attempt, too.
> 
> With
> 
>   while true; do echo $(for); sleep 1; done
> 
> zsh stops (and prints two error messages!), bash does not stop, but
> ksh and /bin/sh do.

These are all perfectly arguable.  In the second case, it's only because
parsing is done before the fork that the shell actually gives up.  If you
attempted to write to an unwritable file in the $(...) it wouldn't stop.  I
don't have any conclusion.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



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