aboutsummaryrefslogtreecommitdiff
path: root/procps/smemcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/smemcap.c')
-rw-r--r--procps/smemcap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/procps/smemcap.c b/procps/smemcap.c
index f2e2de29d..01acbf74e 100644
--- a/procps/smemcap.c
+++ b/procps/smemcap.c
@@ -66,7 +66,11 @@ static void archivefile(const char *path)
66 struct stat s; 66 struct stat s;
67 67
68 /* buffer the file */ 68 /* buffer the file */
69 fd = xopen(path, O_RDONLY); 69 fd = open(path, O_RDONLY);
70 if (fd == -1) {
71 /* skip vanished processes between dir listing and traversal */
72 return;
73 }
70 do { 74 do {
71 cur = xzalloc(sizeof(*cur)); 75 cur = xzalloc(sizeof(*cur));
72 *prev = cur; 76 *prev = cur;