Re: [lxc-devel] [PATCH 1/5] start child in its own process group, and put it into the foreground

2010-06-14 Thread Greg Kurz
On Fri, 2010-06-11 at 14:26 -0700, Matt Helsley wrote: I think shells implementing job control do it in the parent (shell) rather than the child (job) purely out of convention. It might be good They usually do it in both the parent and child. to follow a similar convention even if lxc is

Re: [lxc-devel] [PATCH 1/5] start child in its own process group, and put it into the foreground

2010-06-11 Thread Matt Helsley
On Thu, Jun 10, 2010 at 11:57:20PM +0200, Ferenc Wagner wrote: Daniel Lezcano daniel.lezc...@free.fr writes: On 06/09/2010 07:56 PM, Ferenc Wagner wrote: @@ -509,6 +510,22 @@ int lxc_spawn(struct lxc_handler *handler) } } + if (setpgid(handler-pid, 0)) { +

Re: [lxc-devel] [PATCH 1/5] start child in its own process group, and put it into the foreground

2010-06-10 Thread Daniel Lezcano
On 06/09/2010 07:56 PM, Ferenc Wagner wrote: Signed-off-by: Ferenc Wagnerwf...@niif.hu --- src/lxc/start.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/lxc/start.c b/src/lxc/start.c index b69ac88..7bbcf5a 100644 --- a/src/lxc/start.c +++

Re: [lxc-devel] [PATCH 1/5] start child in its own process group, and put it into the foreground

2010-06-10 Thread Ferenc Wagner
Daniel Lezcano daniel.lezc...@free.fr writes: On 06/09/2010 07:56 PM, Ferenc Wagner wrote: @@ -509,6 +510,22 @@ int lxc_spawn(struct lxc_handler *handler) } } +if (setpgid(handler-pid, 0)) { +SYSERROR(failed to create new process group); +

Re: [lxc-devel] [PATCH 1/5] start child in its own process group, and put it into the foreground

2010-06-09 Thread Ferenc Wagner
Matt Helsley matth...@us.ibm.com writes: On Wed, Jun 09, 2010 at 07:56:03PM +0200, Ferenc Wagner wrote: Signed-off-by: Ferenc Wagner wf...@niif.hu --- src/lxc/start.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/lxc/start.c