-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to rohit sharma on 4/7/2007 11:40 AM:
> but how is it possible to remove the directory in which you are

POSIX does not require this, but also does not forbid it.  On some
implementations (cygwin, for example), it is impossible to remove a
directory that is in use by any process; and this includes being in use by
virtue of being the current working directory.  On other implementations,
such as Linux, removing the directory does not free up any disk resources
as long as a process still has a reference to the inode occupied by that
directory, but the rmdir still succeeds by updating the parent directory
to state that the directory is no longer reachable via the filesystem.
Then, when all processes that use the unlinked directory have exited, the
filesystem can finally reclaim the disk space that the removed directory
occupied.

In short, there is nothing inherently wrong with deleting your current
working directory if that is what the implementation decided.  And Linux
decided to implement things that way.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGF/wL84KuGfSFAYARAidlAJ4vsnjIH8iB4gFjtVaTzYUPGi/QigCZAYyR
l6imFklUa8ILdug+EAP1zMs=
=XMCI
-----END PGP SIGNATURE-----


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to