bug-bash
[Top][All Lists]
Advanced

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

Re: bug when 'cd ..' to a directory who's parent has been deleted


From: Odd Arne Beck
Subject: Re: bug when 'cd ..' to a directory who's parent has been deleted
Date: Tue, 9 Feb 2016 20:43:34 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

Den 09.02.2016 20:15, skrev Chet Ramey:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/9/16 1:54 PM, Mike Frysinger wrote:
On 09 Feb 2016 07:47, Chet Ramey wrote:
On 2/9/16 2:10 AM, Mike Frysinger wrote:
It's still an unlikely scenario.
fwiw, i see it semi often when dealing with build systems:
The unlikely scenario is somehow deleting a non-empty directory, as the
OP
implied in his first posting.
i'm aware of how it's happening.  my point is that it's not completely
unheard of, so i cited the real world cases where it comes up.  and at
least for me, on a semi-regular basis.
We're not talking about the same thing.  The scenario you presented --
removing the entire directory tree including the shell process's current
directory -- is not all that uncommon.  The unlikely scenario I refer to
is somehow -- I'm not sure how -- removing a directory's parent without
removing the directory itself first, which is what the OP's first message
implied he managed to do.  I don't see that scenario ever happening.  It's
unlikely.

- -- ``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAla6OrAACgkQu1hp8GTqdKtHsACeKOzpGwY9du+Sld/uXl4HHYw2
qW0AnR8OHjoFnhpO8ZKxSwvnpu46ZGja
=cAFh
-----END PGP SIGNATURE-----
Chet Ramey: I fear you have misunderstood me (OP). What I meant was, exactly as you say, the parent AND current folder has been removed, but from a different shell. It's also reprodusable if you do something like this from within the same shell:

mkdir -p ~/a/b
cd ~/a/b
rm -rf ~/a
cd ..

Can you see if that produces the same error? It sure does here.
Bash version 4.3, Patch level 11, release status


Best regards

Odd Beck




reply via email to

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