]> granicus.if.org Git - psmisc/commitdiff
doesn't complain about "not a directory"
authorHan Pingtian <hanpt@linux.vnet.ibm.com>
Thu, 20 Dec 2012 03:31:50 +0000 (11:31 +0800)
committerCraig Small <csmall@enc.com.au>
Thu, 21 Feb 2013 11:55:08 +0000 (22:55 +1100)
If /proc/#/fd points to a path which has component removed, fuser
will complain like "Cannot stat file /proc/29322/fd/16: Not a
directory". Looks like it can be disabled just like commit 898dc70a1f
did.

Signed-off-by: Craig Small <csmall@enc.com.au>
src/fuser.c

index 0c773fea1a9a8418f33a51a6e41cf7c613f8ef81..e82d6e071dfb6842691d465f01dc6bd3a412dc2b 100644 (file)
@@ -1411,7 +1411,7 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head,
                         pid, dirname, direntry->d_name);
 
                if (timeout(stat, filepath, &st, 5) != 0) {
-                       if (errno != ENOENT) {
+                       if (errno != ENOENT && errno != ENOTDIR) {
                                fprintf(stderr, _("Cannot stat file %s: %s\n"),
                                        filepath, strerror(errno));
                        }