Ulrich Drepper in comment 6 to redhat bug 483385 links to
austin-group-l, item 11863 by Geoff Clare:
https://bugzilla.redhat.com/show_bug.cgi?id=483385#c6
https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=11863
Geoff Clare writes: [...]
I thi
On 2009-02-10, Chet Ramey wrote:
> I'm not immediately sure where you got that, but the documentation makes
> it clear:
>
> -e Exit immediately if a simple command (see SHELL GRAMMAR
> above) exits with a non-zero status. The shell does not
> exit
> -e
> When this option is on, if a simple command fails for any of the reasons
> listed in Consequences of Shell Errors or returns an exit status value >0, and
> is not part of the compound list following a while, until, or if keyword, and
> is not a part of an AND or OR list, and is not a pip
Chet Ramey wrote:
Roman Rakus wrote:
Hi
there is simple script:
#!/bin/sh
echo foo|cat /nosuchfile
echo "here: $?"
executed by sh -e
In bash-3.2 we got:
cat: /nosuchfile: No such file or directory
but in bash-4.0:
cat: /nosuchfile: No such file or directory
here: 1
The bash-4.0 behav
Chet Ramey wrote:
Roman Rakus wrote:
If this stays as it is, bash will never exit immediately if a command
(in this case pipeline) exits with a non-zero status.
That's clearly not true. Bash will not exit if a pipeline fails, but
will do so if a simple command fails.
Isn't it th
Roman Rakus wrote:
> If this stays as it is, bash will never exit immediately if a command
> (in this case pipeline) exits with a non-zero status.
That's clearly not true. Bash will not exit if a pipeline fails, but
will do so if a simple command fails.
--
``The lyf so short, the craft so long
Roman Rakus wrote:
> Hi
> there is simple script:
> #!/bin/sh
> echo foo|cat /nosuchfile
> echo "here: $?"
>
> executed by sh -e
> In bash-3.2 we got:
> cat: /nosuchfile: No such file or directory
>
> but in bash-4.0:
> cat: /nosuchfile: No such file or directory
> here: 1
The bash-4.0 behavior
Roman Rakus wrote:
Hi
there is simple script:
#!/bin/sh
echo foo|cat /nosuchfile
echo "here: $?"
executed by sh -e
In bash-3.2 we got:
cat: /nosuchfile: No such file or directory
but in bash-4.0:
cat: /nosuchfile: No such file or directory
here: 1
From execute_cmd.c:
/* 10/6/2008 -- added te
Hi
there is simple script:
#!/bin/sh
echo foo|cat /nosuchfile
echo "here: $?"
executed by sh -e
In bash-3.2 we got:
cat: /nosuchfile: No such file or directory
but in bash-4.0:
cat: /nosuchfile: No such file or directory
here: 1
From execute_cmd.c:
/* 10/6/2008 -- added test for pipe_in and p