eval '' would exit an interactive shell

2015-10-01 Thread 紫云飞
$ eval '\' exit I am wondering if this is a bug or intentional behavior.

Add -L to kill builtin to be more compatible to procps version of kill

2015-10-01 Thread Christian Ehrhardt
Hi, I read and worked on a fix reported to ubuntu regarding this issue. https://bugs.launchpad.net/hundredpapercuts/+bug/1488939 Eventually it came down to bash builtin vs procps verison of kill having different options. I proposed a solution making it more similar to the procps verision in a way

Re: eval '' would exit an interactive shell

2015-10-01 Thread Chet Ramey
On 9/29/15 11:48 AM, 紫云飞 wrote: > $ eval '\' > exit > > I am wondering if this is a bug or intentional behavior. It's a bug in bash-4.3, already fixed for the next release. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocra

command substitution is stripping set -e from options

2015-10-01 Thread Christoph Gysin
It seems that set -e is stripped from the options ($-) when executing commands with command substitution: $ bash -euc 'echo $-; f(){ false; echo $->&2; }; x=$(f)' ehuBc huBc I would expect the shell to exit as soon as it executes 'false'. Is this intended? Is it documented somewhere? I'm trying

Re: Add -L to kill builtin to be more compatible to procps version of kill

2015-10-01 Thread Chet Ramey
On 9/30/15 10:07 AM, Christian Ehrhardt wrote: > Hi, > I read and worked on a fix reported to ubuntu regarding this issue. > https://bugs.launchpad.net/hundredpapercuts/+bug/1488939 > > Eventually it came down to bash builtin vs procps verison of kill having > different options. > I proposed a sol

Re: command substitution is stripping set -e from options

2015-10-01 Thread Eric Blake
On 10/01/2015 04:24 AM, Christoph Gysin wrote: > It seems that set -e is stripped from the options ($-) when executing > commands with command substitution: > > $ bash -euc 'echo $-; f(){ false; echo $->&2; }; x=$(f)' > ehuBc > huBc > > I would expect the shell to exit as soon as it executes 'fal

Re: command substitution is stripping set -e from options

2015-10-01 Thread Chet Ramey
On 10/1/15 6:24 AM, Christoph Gysin wrote: > It seems that set -e is stripped from the options ($-) when executing > commands with command substitution: > > $ bash -euc 'echo $-; f(){ false; echo $->&2; }; x=$(f)' > ehuBc > huBc > > I would expect the shell to exit as soon as it executes 'false'.