Skip to content
Commit 4cff7086 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov
Browse files

tty: Make sure the controlling terminal is restored by session leader



The controling terminal should be sestored by a session leader,
thus we need to test if the SID we've found in process tree
is a leader.

Otherwise we might have pretty interesting situation: the user
passed -j on dump, ie telling us to inherit shell jobs and on
restore procedure the SID get inherited from the crtools but
session leader for this sid doesn't belong to our peocess tree
and thus we should not try to restore controlling terminal
but inherit it as well.

Reported-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent ed5f540c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment