From: Dipak Gaigole <dipakgaigole@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: zsh behavior when fork() failed
Date: Tue, 6 Mar 2012 14:31:24 +0530 [thread overview]
Message-ID: <CADs2-=QeFeGF_DNYa99-xC55trF7B+cVtXDa=95rWeKuNbs08Q@mail.gmail.com> (raw)
In-Reply-To: <120229110632.ZM28317@torch.brasslantern.com>
On Thu, Mar 1, 2012 at 12:36 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> 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?
Sorry my bad :( I had missed one of the fatal condition.
Thanks for your help Bart !!!
-Dipak
prev parent reply other threads:[~2012-03-06 9:01 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
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 [this message]
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='CADs2-=QeFeGF_DNYa99-xC55trF7B+cVtXDa=95rWeKuNbs08Q@mail.gmail.com' \
--to=dipakgaigole@gmail.com \
--cc=schaefer@brasslantern.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).