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

Re: exit status problem



On 2010-12-03 16:09:16 +0000, Peter Stephenson wrote:
> I don't understand why you don't get status 0 after 2. "sleep 1 &"
> should reset it.

It doesn't:

xvii:~> zsh -f
xvii% false
xvii% sleep 1&
[1] 8693
xvii% 
[1]  + done       sleep 1
xvii% 
xvii% echo $?
1
xvii% 

The observed behavior doesn't follow the documentation.
The zsh man pages say:

  A backgrounded pipeline returns a status of zero.

It seems to be a bug in zsh 4.3.10 that has been fixed in the latest
dev versions. Do you have more information?

Back to my original problem, I can reproduce it with the dev version,
using:

1. I type "false".
2. I type "sleep 5 &".
3. I type "false".
4. I increase the window width.
5. I type [Enter].

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



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