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: Andreas Schwab
Subject: Re: Bash stating it is in a directory which does not exist
Date: Tue, 19 Feb 2013 10:34:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux)

Nikolas Kallis <nik@nikolaskallis.com> 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 it according to Bash.

Which is true.  The directory still exists, it just doesn't have a name
any more (and you cannot add any files to it any more).  This is similar
to removing the last name of a file that is still held open by some
process.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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