]> git.proxmox.com Git - mirror_lxc.git/commitdiff
coverity: check return from waitpid
authorDwight Engen <dwight.engen@oracle.com>
Tue, 7 May 2013 14:57:33 +0000 (10:57 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 7 May 2013 17:27:06 +0000 (13:27 -0400)
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/monitor.c

index 0521e9ab3e4009598edf7ed839642ec5536e8289..5648b86b5819d94745cade74cc6addfb21a77d7a 100644 (file)
@@ -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;
        }