On Sat, Jan 30, 2016 at 04:31:06PM +0300, Yuriy M. Kaminskiy wrote: > From 64d1e9d905455b8177d65ad58ca2b403bbe8222c Mon Sep 17 00:00:00 2001 > From: "Yuriy M. Kaminskiy" <yumkam@xxxxxxxxx> > Date: Sat, 30 Jan 2016 16:18:39 +0300 > Subject: [PATCH] unshare: fix busyloop and reduce racing probability > > Replace busy-loop with waiting on pipe from parent. > > Note: reduces racing probability, but still there are window where > it is possible (if parent unshare process will be [externally] killed > between successful read(fds[0]) and mount() calls). > > Signed-off-by: Yuriy M. Kaminskiy <yumkam@xxxxxxxxx> > --- > sys-utils/unshare.c | 49 ++++++++++++++++++++++++++++++++++++++++--------- > 1 file changed, 40 insertions(+), 9 deletions(-) Thanks, applied with small changes. I have used stuff from include/all-io.h (loops around read/write) to make code more readable. Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html