diff options
author | Andre Goddard Rosa <andre.rosa@lge.com> | 2018-08-26 17:37:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-08-26 17:37:30 +0200 |
commit | 9a2621a3b9243919921935f0e3eff6d942379e77 (patch) | |
tree | ba5aba3c797834c02c5c854ca63162e1f6140f36 | |
parent | 9d539f9fbd0dc4ea70ed8ba66e3c78150fa8a8b2 (diff) | |
download | busybox-w32-9a2621a3b9243919921935f0e3eff6d942379e77.tar.gz busybox-w32-9a2621a3b9243919921935f0e3eff6d942379e77.tar.bz2 busybox-w32-9a2621a3b9243919921935f0e3eff6d942379e77.zip |
smemcap: keep outputting by ignoring transient processes
function old new delta
archivefile 167 176 +9
Signed-off-by: Andre Goddard Rosa <andre.rosa@lge.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | procps/smemcap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/procps/smemcap.c b/procps/smemcap.c index 81f4cafad..96b565f59 100644 --- a/procps/smemcap.c +++ b/procps/smemcap.c | |||
@@ -66,6 +66,10 @@ static void archivefile(const char *path) | |||
66 | 66 | ||
67 | /* buffer the file */ | 67 | /* buffer the file */ |
68 | fd = xopen(path, O_RDONLY); | 68 | fd = xopen(path, O_RDONLY); |
69 | if (fd == -1) { | ||
70 | /* skip vanished processes between dir listing and traversal */ | ||
71 | return; | ||
72 | } | ||
69 | do { | 73 | do { |
70 | cur = xzalloc(sizeof(*cur)); | 74 | cur = xzalloc(sizeof(*cur)); |
71 | *prev = cur; | 75 | *prev = cur; |