Package: linux-2.6 Severity: important [important since this affects a very common utility: "rm"]
The coreutils snapshot (upstream) does the following in a "rm -r": * Files are unlinked in a first pass: lstat("/proc/self/fd/4/config.h.in", {st_mode=S_IFREG|0644, st_size=27828, ...}) = 0 access("test/config.h.in", W_OK) = 0 unlink("/proc/self/fd/4/config.h.in") = 0 [...] * A directory rewind: lseek(4, 0, SEEK_SET) = 0 * The entries are still seen, though all the files have been unlinked: getdents64(4, /* 15 entries */, 8192) = 472 * The config.h.in is still seen: lstat("/proc/self/fd/4/config.h.in", {st_mode=S_IFREG|0644, st_size=27828, ...}) = 0 * And the following errors are normal (since the file has already been unlinked): access("test/config.h.in", W_OK) = -1 ESTALE (Stale NFS file handle) unlink("/proc/self/fd/4/config.h.in") = -1 ENOENT (No such file or directory) The consequence is that "rm -r" fails, and the directory is not removed (using the -f option doesn't produce such errors, but is not an acceptable workaround because it will removed "protected" files too, in which particular case I want an error). Note: this behavior is not always reproducible. In the bug-coreutils mailing-list, it has been claimed that this is an incorrect behavior (the fact that unlinked files are still seen in the directory stream). The following paragraph has been cited: The rewinddir() function shall reset the position of the directory stream to which dirp refers to the beginning of the directory. It shall also cause the directory stream to refer to the current state of the corresponding directory, as a call to opendir() would have done. (but what is the exact meaning of "state" in the case of NFS, where things may be different on the clients and server sides?) -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18custom-amd64 Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]