Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
On 20 February 2013 01:20, Nikolas Kallis wrote: > Please don't break threads by replying to individuals, it destroys the flow > >> of conversation :-) >> > > What do you mean? You just did it again. You're replying to my e-mail address and *not* the general list. Please don't do that. > I co

Re: Shouldn't this script terminate on ^C?

2013-02-19 Thread Bob Proulx
Nikolaus Schulz wrote: > Please consider this bash script: > > : | while true; do sleep 1; done > echo "After loop" > > If I hit ^C while it runs, shouln't it terminate? > > I have tested bash versions 4.2.37(1)-release, 4.1.5(1)-release, > and 3.2.39(1)-release. (Debian Sid, Squeeze and Len

Re: Shouldn't this script terminate on ^C?

2013-02-19 Thread Chet Ramey
On 2/19/13 1:42 PM, Nikolaus Schulz wrote: > Please consider this bash script: > > : | while true; do sleep 1; done > echo "After loop" > > If I hit ^C while it runs, shouln't it terminate? > > I have tested bash versions 4.2.37(1)-release, 4.1.5(1)-release, > and 3.2.39(1)-release. (Debian

Shouldn't this script terminate on ^C?

2013-02-19 Thread Nikolaus Schulz
Please consider this bash script: : | while true; do sleep 1; done echo "After loop" If I hit ^C while it runs, shouln't it terminate? I have tested bash versions 4.2.37(1)-release, 4.1.5(1)-release, and 3.2.39(1)-release. (Debian Sid, Squeeze and Lenny.) All these bash versions output "Aft

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chet Ramey
On 2/19/13 10:09 AM, Chris Down wrote: >> Bash can be improved by making it check for changes on each return. If you think this is true, use the existing mechanisms to test your hypothesis. PROMPT_COMMAND='cd $PWD || cd ${PWD%/*}' will do much of what you say you want. You can modify that to f

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
Hi, Please don't break threads by replying to individuals, it destroys the flow of conversation :-) I completely disagree that this would be an improvement to bash. It goes against convention and the principle of least astonishment. It is very un-Unix. Chris On 19 February 2013 22:56, Nikolas K

Re: moving fd affect outer scope

2013-02-19 Thread Chet Ramey
On 2/18/13 2:55 PM, Stephane Chazelas wrote: > Bash Version: 4.2 > Patch Level: 37 > Release Status: release > > Moving a file descriptor for a builtin command or a compound > command leaves the fd closed afterwards: > > $ bash -c ': <&1-; echo test' > bash: line 0: echo: write error: Bad file d

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Andreas Schwab
Nikolas Kallis writes: > I have found a bug in Bash: > > /opt/foobar$ > /opt/foobar$ rmdir ../foobar/ > /opt/foobar$ > > With the above, one can see I deleted the directory 'foobar/' from within > the directory itself. What one can also see is that after I deleted the > directory, I was still in

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Chris Down
This is to do with the way Linux handles open file descriptors. It is not a bug in bash, it is expected (and anticipated) behaviour. Chris On 19 February 2013 14:00, Nikolas Kallis wrote: > Hello, > > > > I have found a bug in Bash: > > /opt/foobar$ > /opt/foobar$ rmdir ../foobar/ > /opt/foobar

Re: Bash stating it is in a directory which does not exist

2013-02-19 Thread Davide Brini
On Tue, 19 Feb 2013 17:00:32 +1100, Nikolas Kallis wrote: > Hello, > > > > I have found a bug in Bash: > > /opt/foobar$ > /opt/foobar$ rmdir ../foobar/ > /opt/foobar$ > > With the above, one can see I deleted the directory 'foobar/' from > within the directory itself. What one can also see

Bash stating it is in a directory which does not exist

2013-02-19 Thread Nikolas Kallis
Hello, I have found a bug in Bash: /opt/foobar$ /opt/foobar$ rmdir ../foobar/ /opt/foobar$ With the above, one can see I deleted the directory 'foobar/' from within the directory itself. What one can also see is that after I deleted the directory, I was still in it according to Bash. This