From: Dwight Engen Date: Tue, 7 May 2013 14:57:33 +0000 (-0400) Subject: coverity: check return from waitpid X-Git-Tag: lxc-1.0.0.alpha1~1^2~221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2bbe86da4044c8db39e6eae19541fe2d117bae7;p=thirdparty%2Flxc.git coverity: check return from waitpid Signed-off-by: Dwight Engen Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index 0521e9ab3..5648b86b5 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) + return -1; return 0; }