[CRIU] [PATCH cr 0/8] Restore SID

Andrey Vagin avagin at openvz.org
Wed Jun 13 07:35:30 EDT 2012


We need to reconstruct a processes tree, because a sid can't be set,
it may be only inherit.

Thre fundamental cases exist:
* A session leader is dead
  - add a fake task
* A task is detached to init
  - add a fake task and connect it to the session leader
* A parent forked a child, then changed own sid
  - determining a sid with which the parent was born.

Andrey Vagin (8):
  zdtm: add new test case for checking that SID is restored
  pstree: simplify access to pid, real_pid, born_sid
  restore: calculate a maximum value of PID-s
  restore: add interface for creating helper tasks
  restore: restore sids of tasks, which have been reparented to init
  restore: restore sid of task which isn't leaders and isn't a child of
    init
  restore: print message about sid only if it's restored
  restorer: exit all threads in case of error

 cr-dump.c                         |   70 ++++++------
 cr-restore.c                      |  220 +++++++++++++++++++++++++++++++----
 cr-show.c                         |    8 +-
 files.c                           |    4 +-
 include/crtools.h                 |   11 +-
 include/image.h                   |    1 +
 include/syscall-x86-64.def        |    1 +
 restorer.c                        |    6 +-
 test/zdtm.sh                      |    5 +
 test/zdtm/live/static/Makefile    |    1 +
 test/zdtm/live/static/session00.c |  228 +++++++++++++++++++++++++++++++++++++
 11 files changed, 484 insertions(+), 71 deletions(-)
 create mode 100644 test/zdtm/live/static/session00.c


More information about the CRIU mailing list