* [C/R][PATCH] Use __WALL option in waitpid()
@ 2009-06-27 19:27 Sukadev Bhattiprolu
[not found] ` <20090627192704.GA14326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Sukadev Bhattiprolu @ 2009-06-27 19:27 UTC (permalink / raw)
To: Oren Laadan; +Cc: Containers
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);
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <20090627192704.GA14326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [C/R][PATCH] Use __WALL option in waitpid() [not found] ` <20090627192704.GA14326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2009-06-28 5:17 ` Sukadev Bhattiprolu [not found] ` <20090628051707.GA21192-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Sukadev Bhattiprolu @ 2009-06-28 5:17 UTC (permalink / raw) To: Oren Laadan; +Cc: Containers Oren, (Following up on the discussion from IRC) I had run my application as: ns_exec -cpuimP pid.ptree1 -- ./ptree1 -n 2 -d 1 -w sleep ns_exec creates the application in new container, with p->exit_signal 0. for the container-init. When we checkpoint the process tree, we correctly save and restore the exit_signal to 0. Because of that, we need the coordinator to use __WALL. Sukadev Sukadev Bhattiprolu [sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org] wrote: | | 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); | _______________________________________________ | Containers mailing list | Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org | https://lists.linux-foundation.org/mailman/listinfo/containers ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20090628051707.GA21192-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>]
* Re: [C/R][PATCH] Use __WALL option in waitpid() [not found] ` <20090628051707.GA21192-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> @ 2009-07-02 5:55 ` Oren Laadan 0 siblings, 0 replies; 3+ messages in thread From: Oren Laadan @ 2009-07-02 5:55 UTC (permalink / raw) To: Sukadev Bhattiprolu; +Cc: Containers Got it, thanks. Oren. Sukadev Bhattiprolu wrote: > Oren, > > (Following up on the discussion from IRC) > > I had run my application as: > > ns_exec -cpuimP pid.ptree1 -- ./ptree1 -n 2 -d 1 -w sleep > > ns_exec creates the application in new container, with p->exit_signal 0. > for the container-init. When we checkpoint the process tree, we > correctly save and restore the exit_signal to 0. Because of that, > we need the coordinator to use __WALL. > > Sukadev > > Sukadev Bhattiprolu [sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org] wrote: > | > | 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); > | _______________________________________________ > | Containers mailing list > | Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > | https://lists.linux-foundation.org/mailman/listinfo/containers > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-02 5:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 19:27 [C/R][PATCH] Use __WALL option in waitpid() Sukadev Bhattiprolu
[not found] ` <20090627192704.GA14326-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-06-28 5:17 ` Sukadev Bhattiprolu
[not found] ` <20090628051707.GA21192-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-02 5:55 ` Oren Laadan
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.