Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread L A Walsh
Chet Ramey wrote: This is all correct. The change was introduced for a reason, and accommodating a rare occurrence by backing it out would be non- productive. --- The reason?: Why does bash clear OLDPWD when a child script is started? OLDPWD is exported and passed to any children, but bas

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread Mikulas Patocka
On Thu, 28 Sep 2017, Eduardo A. Bustamante López wrote: > On Thu, Sep 28, 2017 at 11:44:02AM +0200, Mikulas Patocka wrote: > [...] > > +++ bash/variables.c > > @@ -899,7 +899,7 @@ set_pwd () > > don't find OLDPWD in the environment, or it doesn't name a directory, > > make a dummy in

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread Mikulas Patocka
On Fri, 29 Sep 2017, Mikulas Patocka wrote: > > > On Thu, 28 Sep 2017, Eduardo A. Bustamante López wrote: > > > On Thu, Sep 28, 2017 at 11:44:02AM +0200, Mikulas Patocka wrote: > > [...] > > > +++ bash/variables.c > > > @@ -899,7 +899,7 @@ set_pwd () > > > don't find OLDPWD in the envir

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread Eduardo A . Bustamante López
On Fri, Sep 29, 2017 at 11:12:59AM +0200, Mikulas Patocka wrote: > This patch doesn't revert the above change. It only removes a test if > $OLDPWD is a directory. With this patch, if $OLDPWD points to a directory, > there will be no change, and if $OLDPWD points to non-directory, it will > not b

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread Eduardo A . Bustamante López
On Fri, Sep 29, 2017 at 12:51:37AM -0700, L A Walsh wrote: [...] > Why does bash clear OLDPWD when a child script is started? > > OLDPWD is exported and passed to any children, but bash apparently clears > OLDPWD whenever a child script is started... > > GNU bash, version 4.1.2(1)-release (x86_64

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread L A Walsh
Eduardo � wrote: On Fri, Sep 29, 2017 at 12:51:37AM -0700, L A Walsh wrote: Why does bash clear OLDPWD when a child script is started? OLDPWD is exported and passed to any children, but bash apparently clears OLDPWD whenever a child script is started... GNU bash, version 4.1.2(1)-release (x

Re: [PATCH] Fix hang if $OLDPWD points to inaccessible directory

2017-09-29 Thread Chet Ramey
On 9/29/17 5:12 AM, Mikulas Patocka wrote: > > > On Thu, 28 Sep 2017, Eduardo A. Bustamante López wrote: > >> On Thu, Sep 28, 2017 at 11:44:02AM +0200, Mikulas Patocka wrote: >> [...] >>> +++ bash/variables.c >>> @@ -899,7 +899,7 @@ set_pwd () >>> don't find OLDPWD in the environment, or i