bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#18851: 24.4; emacs cannot be started if the current directory has be


From: Andreas Schwab
Subject: bug#18851: 24.4; emacs cannot be started if the current directory has been removed
Date: Wed, 29 Oct 2014 16:39:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> > > Note that the current directory can also be removed after Emacs
>> > > is started, so I expect that Emacs already supports cases like
>> > > that.
>> > 
>> > No, it does not.  Either the OS leaves the directory in existence
>> > until Emacs exits, or the OS prevents you from removing it.
>> 
>> Linux does neither.
>
> AFAIK, GNU/Linux does the former.  The directory is not physically
> removed until the last process that has an open file descriptor for it
> closes that descriptor.  Any attempts to reference that directory for
> obtaining a new descriptor will get ENOENT, i.e. the OS pretends that
> the directory doesn't exist.  But existing descriptors are valid, and
> can be used as usual.

"As usual" is an exaggeration.  Basically the only valid operations on
it are fstat and fchdir.  Any attempt at adding an entry to it (via
openat) will be rejected.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





reply via email to

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