mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
pstree: when updating sid for shell job also update matching pgid
If we replace old_sid with current_sid we should also do same replacement for matching pgid (=old_sid). Reported in CRIU gitter by Younes Manton (@ymanton) Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
89267dbcc8
commit
fdf4fda200
1 changed files with 3 additions and 0 deletions
|
|
@ -382,6 +382,9 @@ static int prepare_pstree_for_shell_job(pid_t pid)
|
|||
for_each_pstree_item(pi) {
|
||||
if (pi->sid == old_sid)
|
||||
pi->sid = current_sid;
|
||||
|
||||
if (pi->pgid == old_sid)
|
||||
pi->pgid = current_sid;
|
||||
}
|
||||
|
||||
if (lookup_create_item(current_sid) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue