zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Dipak Gaigole <dipakgaigole@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: zsh behavior when fork() failed
Date: Fri, 24 Feb 2012 10:05:18 -0800	[thread overview]
Message-ID: <120224100518.ZM13322@torch.brasslantern.com> (raw)
In-Reply-To: <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.


  reply	other threads:[~2012-02-24 18:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 10:40 Dipak Gaigole
2012-02-23 16:14 ` Bart Schaefer
2012-02-24 11:08   ` Dipak Gaigole
2012-02-24 18:05     ` Bart Schaefer [this message]
2012-02-25 16:33       ` Dipak Gaigole
2012-02-26 19:52         ` Bart Schaefer
2012-02-26 21:57           ` Bart Schaefer
2012-02-29 12:57           ` Dipak Gaigole
2012-02-29 19:06             ` Bart Schaefer
2012-03-06  9:01               ` Dipak Gaigole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=120224100518.ZM13322@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=dipakgaigole@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).