[CRIU] [PATCH 00/10] rework pgid restore for pidnses

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Tue Jul 4 12:07:59 MSK 2017


These is a second part of pstree rework because of nested namespaces,
adds pgid restore and several improvements.

1) Rework pgid leader helpers creation in accordance with pidnses,
skip adding the leader for shell_job mode.

2) Do set born_sid in can_inherit_sid.

3) Cover only simple case: each task should setpgid itself,
if it can't - fail restore. Add universal set_pgid function
to check all restrictions before syscall. Group leaders
provide member a chance to self-set the right pgid.

4) Add test for 1,3

https://jira.sw.ru/browse/PSBM-62139

Pavel Tikhomirov (10):
  pstree: fix my_pgid is on last level but vpid is on level 0
  pstree: make helper items for pgid replaceable
  pstree: add id intersection bug_on to prepare_pstree_for_shell_job
  pstree: add prepare_pstree_leaders to create sid/pgid helpers in
    advance
  pstree: add curr_sid/pgid updating them on fork/setsid/setpgid
  pstree: reuse can_inherit_sid helper to set born_sid at the same time
  pstree: check that all processes see their group leader
  pstree: add set_pgid function to check everything before real syscall
  pstree: leaders wait group members temporary setpgid to their pid
  zdtm: test pgid is restored fine in nested pidnses

 criu/cr-restore.c            | 113 ++++++----
 criu/include/namespaces.h    |   2 +
 criu/include/pstree.h        |   3 +
 criu/include/rst_info.h      |  11 +-
 criu/namespaces.c            |  11 +
 criu/pstree.c                | 490 +++++++++++++++++++++++++++++++------------
 test/zdtm/static/session04.c |  76 ++++++-
 7 files changed, 529 insertions(+), 177 deletions(-)

-- 
2.9.4



More information about the CRIU mailing list