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>
This commit is contained in:
Andre Goddard Rosa 2018-08-26 17:37:30 +02:00 committed by Denys Vlasenko
parent 9d539f9fbd
commit 9a2621a3b9

View File

@ -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;