From: Serge Hallyn Date: Thu, 25 Apr 2013 00:59:10 +0000 (-0500) Subject: monitor.c: sanity check on waitpid return value X-Git-Tag: lxc-1.0.0.alpha1~1^2~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b7916695264238a490971e8cd87612154fc18b1;p=thirdparty%2Flxc.git monitor.c: sanity check on waitpid return value Signed-off-by: Serge Hallyn --- 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; }