* pidof - shorten list check a bit for network based processes

This commit is contained in:
Werner Fink 2010-02-23 17:12:12 +00:00
parent 9e449b3f6d
commit 1107f3ba7d

View 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;