[lxc-devel] [PATCH 5/6] coverity: check return from waitpid
Dwight Engen
dwight.engen at oracle.com
Tue May 7 14:57:33 UTC 2013
Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
---
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 0521e9a..5648b86 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;
}
--
1.8.1.4
More information about the lxc-devel
mailing list