[CRIU] Re: [PATCH cr] restore: inherit current sid and pgid if a root task isn't a leader

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 5 11:24:06 EDT 2012


On Wed, Sep 05, 2012 at 07:19:55PM +0400, Andrey Vagin wrote:
> 
> crtools can dump a subtree, where a root task isn't a session leader.
> E.g: you want to dump "top" and restore it in another terminal.
> 
> In this case crtools should not try to restore sid of this task and
> all other tasks from this session. All this tasks will inherit sid
> from a current process.
> 
> All that is true for pgid and a control tty.
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 

> diff --git a/cr-restore.c b/cr-restore.c
> index 8200996..c4191be 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -633,6 +633,9 @@ static void restore_sid(void)
>  	 * we can call setpgid() on custom values.
>  	 */
> 

Looks good to me, except, Andrew, may I ask you to add some
comments here. Change logs are good for sure but when we
modify code we rare to look the changelogs, right? ;)

(sure comments can be added on top of this patch).

	Cyrill


More information about the CRIU mailing list