From f2bbe86da4044c8db39e6eae19541fe2d117bae7 Mon Sep 17 00:00:00 2001 From: Dwight Engen Date: Tue, 7 May 2013 10:57:33 -0400 Subject: [PATCH] coverity: check return from waitpid Signed-off-by: Dwight Engen Acked-by: Serge E. 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..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; }