projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
udhcpc: code shrink
[oweals/busybox.git]
/
procps
/
smemcap.c
diff --git
a/procps/smemcap.c
b/procps/smemcap.c
index 81f4cafad084f7eff06a90406adc14cd319efa7e..2f8ab192e2101c8445cee79c9299534d3b482ed1 100644
(file)
--- a/
procps/smemcap.c
+++ b/
procps/smemcap.c
@@
-65,7
+65,11
@@
static void archivefile(const char *path)
struct stat s;
/* buffer the file */
- fd = xopen(path, O_RDONLY);
+ fd = open(path, O_RDONLY);
+ if (fd == -1) {
+ /* skip vanished processes between dir listing and traversal */
+ return;
+ }
do {
cur = xzalloc(sizeof(*cur));
*prev = cur;