bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chris Down
Subject: Re: Bash stating it is in a directory which does not exist
Date: Tue, 19 Feb 2013 17:27:15 +0800

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 <nik@nikolaskallis.com> 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 is that after I deleted the
> directory, I was still in it according to Bash.
>
> This is a bug because Bash is telling me something which is not true.
>
> To fix this, Bash needs poll to confirm the file system location its
> working in still exists, and to to move to the next valid '../' when the
> address it was working in no longer exists.
>
> Perhaps this can be done automaticly, automaticly only if there is no
> input, or on the next return.
> On the next return would be safest I think.
>
>
>
> Regards,
>
> Nikolas Kallis
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]