diff options
Diffstat (limited to 'procps')
-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) /* buffer the file */ fd = xopen(path, O_RDONLY); + if (fd == -1) { + /* skip vanished processes between dir listing and traversal */ + return; + } do { cur = xzalloc(sizeof(*cur)); *prev = cur; |