All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: [C/R][PATCH] Use __WALL option in waitpid()
Date: Sat, 27 Jun 2009 12:27:04 -0700	[thread overview]
Message-ID: <20090627192704.GA14326@us.ibm.com> (raw)


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 <sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

---
 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);

             reply	other threads:[~2009-06-27 19:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-27 19:27 Sukadev Bhattiprolu [this message]
     [not found] ` <20090627192704.GA14326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-28  5:17   ` [C/R][PATCH] Use __WALL option in waitpid() Sukadev Bhattiprolu
     [not found]     ` <20090628051707.GA21192-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-02  5:55       ` Oren Laadan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090627192704.GA14326@us.ibm.com \
    --to=sukadev-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.