From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25256 invoked by alias); 29 Feb 2012 19:06:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30304 Received: (qmail 18768 invoked from network); 29 Feb 2012 19:06:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120229110632.ZM28317@torch.brasslantern.com> Date: Wed, 29 Feb 2012 11:06:32 -0800 In-reply-to: Comments: In reply to Dipak Gaigole "Re: zsh behavior when fork() failed" (Feb 29, 6:27pm) References: <120223081441.ZM2715@torch.brasslantern.com> <120224100518.ZM13322@torch.brasslantern.com> <120226115220.ZM17815@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Dipak Gaigole Subject: Re: zsh behavior when fork() failed Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 29, 6:27pm, Dipak Gaigole wrote: } } I have applied this patch but unfortunately the script still continues } even after the fork failures while executing commands from the script. } } bash-2.05b$ cat /tmp/test1.sh } #!/bin/sh } x="My default value" } x=`date` } echo $? } echo "Current Date is:" "$x" } date } echo $? } bash-2.05b$ zsh /tmp/test1.sh } /tmp/test1.sh:3: fork failed: resource temporarily unavailable } 1 } Current Date is: My default value } /tmp/test1.sh:6: fork failed: resource temporarily unavailable } 1 } bash-2.05b$ } } Can you please check this on your end? I get (schaefer[N] is my top-level prompt): schaefer[691] Src/zsh -f /tmp/test1.sh /tmp/test1.sh:3: fork failed: resource temporarily unavailable 1 Current Date is: My default value /tmp/test1.sh:6: fork failed: resource temporarily unavailable schaefer[692] echo $? 1 There's no exit after `date` because that was in a subshell, but I do see the exit after the command in the parent shell. Are you sure a path-searched "zsh" is finding the right binary?