All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][usercr]: Ghost tasks must be detached
@ 2010-12-11  3:35 Sukadev Bhattiprolu
       [not found] ` <20101211033548.GA12584-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 28+ messages in thread
From: Sukadev Bhattiprolu @ 2010-12-11  3:35 UTC (permalink / raw)
  To: Oren Laadan; +Cc: Containers


From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Fri, 10 Dec 2010 19:23:58 -0800
Subject: [PATCH 1/1] Ghost tasks must be detached

Ghost processes are created only to help restore orphaned sessions/pgrps.
As such once the session/pgrp is created the ghost must not send another
SIGCHLD to the parent but exit silently.  So create such tasks as
"detached".

See also:

https://lists.linux-foundation.org/pipermail/containers/2010-December/026076.html

Signed-off-by: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
---
 restart.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/restart.c b/restart.c
index 9fb5e9f..d7ba26b 100644
--- a/restart.c
+++ b/restart.c
@@ -1744,6 +1744,13 @@ static pid_t ckpt_fork_child(struct ckpt_ctx *ctx, struct task *child)
 		flags |= CLONE_THREAD | CLONE_SIGHAND | CLONE_VM;
 	else if (child->flags & TASK_SIBLING)
 		flags |= CLONE_PARENT;
+	else if (child->flags & (TASK_GHOST|TASK_DEAD)) {
+		/* 
+		 * Ghosts must vanish silently (without signalling parent)
+		 * when they are done.
+		 */
+		flags = 0xFF;
+	}
 
 	memset(&clone_args, 0, sizeof(clone_args));
 	clone_args.nr_pids = 1;
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-02-25 15:46 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-11  3:35 [PATCH][usercr]: Ghost tasks must be detached Sukadev Bhattiprolu
     [not found] ` <20101211033548.GA12584-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-01-11  1:51   ` Oren Laadan
     [not found]     ` <4D2BB78A.9090701-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-05 18:55       ` Oren Laadan
     [not found]         ` <4D4D9D1B.3000209-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-05 21:40           ` Sukadev Bhattiprolu
     [not found]             ` <20110205214032.GA12944-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-05 22:02               ` Oren Laadan
     [not found]                 ` <4D4DC90B.3010103-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-05 22:33                   ` Oren Laadan
2011-02-09  2:09                   ` Sukadev Bhattiprolu
     [not found]                     ` <20110209020942.GA5339-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-09  3:35                       ` Oren Laadan
     [not found]                         ` <4D520B78.9020300-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-10  2:44                           ` Sukadev Bhattiprolu
     [not found]                             ` <20110210024430.GA23167-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-10  3:53                               ` Oren Laadan
     [not found]                                 ` <4D536154.8000900-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-10  6:17                                   ` Sukadev Bhattiprolu
     [not found]                                     ` <20110210061730.GA25432-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-10 14:56                                       ` Oren Laadan
     [not found]                                         ` <4D53FC9C.1050405-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-10 17:42                                           ` Sukadev Bhattiprolu
2011-02-16 20:10                                           ` Sukadev Bhattiprolu
     [not found]                                             ` <20110216201019.GA27698-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-17 15:21                                               ` Louis Rilling
     [not found]                                                 ` <20110217152116.GM518-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2011-02-21 20:40                                                   ` Sukadev Bhattiprolu
     [not found]                                                     ` <20110221204058.GC14377-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-22 10:28                                                       ` Louis Rilling
2011-02-09 12:01                       ` Louis Rilling
     [not found]                         ` <20110209120100.GD13323-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2011-02-09 12:18                           ` Oren Laadan
     [not found]                             ` <4D528629.7030905-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2011-02-09 12:35                               ` Louis Rilling
     [not found]                                 ` <20110209123550.GG13323-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2011-02-09 12:37                                   ` Louis Rilling
2011-02-09 19:02                           ` Sukadev Bhattiprolu
     [not found]                             ` <20110209190216.GA17051-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-10 10:23                               ` Louis Rilling
     [not found]                                 ` <20110210102312.GC6360-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2011-02-10 17:54                                   ` Sukadev Bhattiprolu
     [not found]                                     ` <20110210175409.GB1025-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-10 18:04                                       ` Louis Rilling
     [not found]                                         ` <20110210180433.GI6360-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2011-02-10 22:31                                           ` Sukadev Bhattiprolu
2011-02-25  7:58   ` Sukadev Bhattiprolu
     [not found]     ` <20110225075808.GC24361-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2011-02-25 15:46       ` 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.