diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 01:10:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 01:10:03 +0000 |
commit | 49b78fc1a8f1591fa172399b3be1dba4b7f23554 (patch) | |
tree | f34271a9e766725cb6ce59c35cc98d91ddf137ac /procps | |
parent | a3087ca7495e33b19b122869d17defeb9c933d19 (diff) | |
download | busybox-w32-1_10_3.tar.gz busybox-w32-1_10_3.tar.bz2 busybox-w32-1_10_3.zip |
Apply post-1.10.2 fixes, bump version to 1.10.31_10_3
Diffstat (limited to 'procps')
-rw-r--r-- | procps/fuser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/procps/fuser.c b/procps/fuser.c index fd876d559..55f7917a0 100644 --- a/procps/fuser.c +++ b/procps/fuser.c | |||
@@ -208,6 +208,7 @@ static pid_list *scan_dir_links(const char *dname, pid_t pid, | |||
208 | return plist; | 208 | return plist; |
209 | } | 209 | } |
210 | 210 | ||
211 | /* NB: does chdir internally */ | ||
211 | static pid_list *scan_proc_pids(inode_list *ilist) | 212 | static pid_list *scan_proc_pids(inode_list *ilist) |
212 | { | 213 | { |
213 | DIR *d; | 214 | DIR *d; |
@@ -215,7 +216,8 @@ static pid_list *scan_proc_pids(inode_list *ilist) | |||
215 | pid_t pid; | 216 | pid_t pid; |
216 | pid_list *plist; | 217 | pid_list *plist; |
217 | 218 | ||
218 | d = opendir("."); | 219 | xchdir("/proc"); |
220 | d = opendir("/proc"); | ||
219 | if (!d) | 221 | if (!d) |
220 | return NULL; | 222 | return NULL; |
221 | 223 | ||
@@ -329,7 +331,7 @@ Find processes which use FILEs or PORTs | |||
329 | pp++; | 331 | pp++; |
330 | } | 332 | } |
331 | 333 | ||
332 | plist = scan_proc_pids(ilist); | 334 | plist = scan_proc_pids(ilist); /* changes dir to "/proc" */ |
333 | 335 | ||
334 | if (!plist) | 336 | if (!plist) |
335 | return EXIT_FAILURE; | 337 | return EXIT_FAILURE; |