* pidof - shorten list check a bit for network based processes
authorDr. Werner Fink <werner@suse.de>
Tue, 23 Feb 2010 17:12:12 +0000 (17:12 +0000)
committerDr. Werner Fink <werner@suse.de>
Tue, 23 Feb 2010 17:12:12 +0000 (17:12 +0000)
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@39 456724a4-4300-0410-8514-c89748c515a2

src/killall5.c

index 3a3dec31aec56403e010b8e07a9749482e9dff0f..3a67ae50d1f9864f0b818e9968e19eff2eb39391 100644 (file)
@@ -737,7 +737,8 @@ PIDQ_HEAD *pidof(char *prog)
                        char exe [PATH_MAX+1];
                        char path[PATH_MAX+1];
                        int len;
-
+                       if (!p->nfs)
+                               continue;
                        snprintf(exe, sizeof(exe), "/proc/%d/exe", p->pid);
                        if ((len = readlink(exe, path, PATH_MAX)) < 0)
                                    continue;