Util-Linux package development
 help / color / mirror / Atom feed
* [PATCH] fix lsns failure after zombie process
@ 2016-01-15 21:38 Yuriy M. Kaminskiy
  2016-01-18  9:14 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Yuriy M. Kaminskiy @ 2016-01-15 21:38 UTC (permalink / raw)
  To: util-linux

(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;
 	}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-18  9:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-15 21:38 [PATCH] fix lsns failure after zombie process Yuriy M. Kaminskiy
2016-01-18  9:14 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox