From: yumkam@gmail.com (Yuriy M. Kaminskiy)
To: util-linux@vger.kernel.org
Subject: [PATCH] fix lsns failure after zombie process
Date: Sat, 16 Jan 2016 00:38:00 +0300 [thread overview]
Message-ID: <m3r3hih6br.fsf@gmail.com> (raw)
(At least on kernel 3.16), stat("/proc/${pid_of_zombie}/ns/mnt") returns
-ENOENT, as a result lsns stops scanning processes prematurely.
--- util-linux.orig/sys-utils/lsns.c
+++ util-linux/sys-utils/lsns.c
@@ -308,7 +308,7 @@ static int read_processes(struct lsns *l
while (proc_next_pid(proc, &pid) == 0) {
rc = read_process(ls, pid);
- if (rc && rc != -EACCES)
+ if (rc && rc != -EACCES && rc != -ENOENT)
break;
rc = 0;
}
next reply other threads:[~2016-01-15 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 21:38 Yuriy M. Kaminskiy [this message]
2016-01-18 9:14 ` [PATCH] fix lsns failure after zombie process Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3r3hih6br.fsf@gmail.com \
--to=yumkam@gmail.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox