← Commit list

5de8a13b0

Denis Vlasenko
Denis Vlasenko
2008-05-28
FAILED Duration: 23s

Subject

fiser: opendir "/proc", not "." (by Cristian Ionescu-Idbohrn)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

procps/fuser.c+3 -2
@@ -208,6 +208,7 @@ static pid_list *scan_dir_links(const char *dname, pid_t pid,
return plist;
}
+/* NB: does chdir internally */
static pid_list *scan_proc_pids(inode_list *ilist)
{
DIR *d;
@@ -215,7 +216,7 @@ static pid_list *scan_proc_pids(inode_list *ilist)
pid_t pid;
pid_list *plist;
- d = opendir(".");
+ d = opendir("/proc");
if (!d)
return NULL;
@@ -329,7 +330,7 @@ Find processes which use FILEs or PORTs
pp++;
}
- plist = scan_proc_pids(ilist);
+ plist = scan_proc_pids(ilist); /* changes dir to "/proc" */
if (!plist)
return EXIT_FAILURE;