projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea9f7a6
)
fiser: opendir "/proc", not "." (by Cristian Ionescu-Idbohrn)
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 28 May 2008 12:44:22 +0000
(12:44 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 28 May 2008 12:44:22 +0000
(12:44 -0000)
procps/fuser.c
patch
|
blob
|
history
diff --git
a/procps/fuser.c
b/procps/fuser.c
index fd876d5599408b87b84b3489de19bbe52fa61d46..663abe478eea127cdb459213e3adc052e7545d4a 100644
(file)
--- a/
procps/fuser.c
+++ b/
procps/fuser.c
@@
-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;