Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh behavior when fork() failed
- X-seq: zsh-workers 30267
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Dipak Gaigole <dipakgaigole@xxxxxxxxx>
- Subject: Re: zsh behavior when fork() failed
- Date: Fri, 24 Feb 2012 10:05:18 -0800
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <CADs2-=Qz7RaX_ntVupWo=rk+-cKj45-i1K=rhm9p6Apw-xa5sQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CADs2-=SFXA0rt1tKvBTnJC=UGdeaQk_GhSp_xM9EGFi_RW_YxA@mail.gmail.com> <120223081441.ZM2715@torch.brasslantern.com> <CADs2-=Qz7RaX_ntVupWo=rk+-cKj45-i1K=rhm9p6Apw-xa5sQ@mail.gmail.com>
On Feb 24, 4:38pm, Dipak Gaigole wrote:
}
} As we can see that zsh continues even if it knows that it has failed
} in fork and finally the script return status is 0.
The script return status is zero because the last command it executed
was successful. That has nothing to do with the rest of the question.
} Also checking for $? after each command is not feasible. So doesn't
} this zsh behavior looks misleading?
Depends on whether fork failure is supposed to be fatal to the shell.
I looked at:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
Section 2.8.1 lists command execution failures where a non-interactive
shell "shall exit", but fork failure is not among them.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author