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: Wed, 29 Feb 2012 11:06:32 -0800	[thread overview]
Message-ID: <120229110632.ZM28317@torch.brasslantern.com> (raw)
In-Reply-To: <CADs2-=Qb4o9gh_40ASr8HNGfpSz8XLEcy0pqQLnJC+eE6ZvRSg@mail.gmail.com>

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?


  reply	other threads:[~2012-02-29 19:06 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 [this message]
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=120229110632.ZM28317@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).