-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Eric Blake on 1/28/2008 6:28 AM: | According to Geoff Clare on 1/28/2008 2:57 AM: | |> | |> My strict reading of the current wording in draft 4 does not permit | Linux' | |> behavior (even though it is more useful, in my opinion), since the | |> trailing slash on B/ means that the old argument names a directory by | the | |> rewritten path resolution rules in XBD 4.12 (line 3008). | | | | Right. The behaviour on Solaris and FreeBSD is the one required | | by the standard. It is also the behaviour on all certified UNIX03 and | | POSIX01 systems because a test for it is included in the tests for | | rename() in The Open Group's UNIX03/POSIX01 test suite. | | | | (I just checked, and Linux does indeed fail the test, which reports an | | unexpected ENOTDIR error.) | | | | Linux also gives ENOTDIR for rmdir("B/"), instead of removing A and | | leaving B as a broken link as the standard requires. | | However, I find the Linux behavior (for rename at least) much friendlier, | and would like to see the standard permit that behavior. So it sounds | like when I write the aardvark, that both behaviors need to be permitted, | rather than declaring existing behavior of UNIX03/POSIX01 invalid.
I wrote the aardvark along those lines, and it was rejected in yesterday's meeting of the Austin Group. They argued that Linux is allowed to fail to follow symlink-to-dir/ in the rename and rmdir case, but only if it returns a different errno than ENOTDIR. https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=11349 I wonder if we would have much luck proposing a patch to the Linux kernel folks to do just that? Otherwise, I'm afraid that coreutils mv and rmdir will just have to remain non-POSIX-compliant on Linux because the underlying syscall is violating semantics. - -- 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 iD8DBQFHvsGO84KuGfSFAYARAssiAKCyga5tFzqIYzaalxox9qgEu1eVAACfQD1w 1fzWlkNiV0YLqdaeU939qKI= =a1x0 -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils