From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sukadev Bhattiprolu Subject: [C/R][PATCH] Use __WALL option in waitpid() Date: Sat, 27 Jun 2009 12:27:04 -0700 Message-ID: <20090627192704.GA14326@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Oren Laadan Cc: Containers List-Id: containers.vger.kernel.org The coordinator creates the children with clone(), so pass the __WALL option to waitpid(). Otherwise the waitpid() will fail, and bring the container down even as the application is restarting successfully :-) Signed-off-by: Sukadev Bhattiprolu --- mktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: user-cr/mktree.c =================================================================== --- user-cr.orig/mktree.c 2009-06-27 12:16:42.000000000 -0700 +++ user-cr/mktree.c 2009-06-27 12:17:02.000000000 -0700 @@ -523,7 +523,7 @@ static int ckpt_collect_child(pid_t pid, { int status; - pid = waitpid(pid, &status, 0); + pid = waitpid(pid, &status, __WALL); if (pid < 0) { perror("WEIRD: collect child task"); exit(1);