From 6b7916695264238a490971e8cd87612154fc18b1 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Wed, 24 Apr 2013 19:59:10 -0500 Subject: [PATCH] monitor.c: sanity check on waitpid return value Signed-off-by: Serge Hallyn --- src/lxc/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index 0521e9ab3..5d655bd1a 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -207,7 +207,8 @@ int lxc_monitord_spawn(const char *lxcpath) } if (pid1) { - waitpid(pid1, NULL, 0); + if (waitpid(pid1, NULL, 0) != pid1) + SYSERROR("unexpected waitpid return value on double-fork"); return 0; } -- 2.47.2