• Andrey Vagin's avatar
    crtools: link pstree_item-s in a tree (v3) · cf63c1d9
    Andrey Vagin authored
    because they describes a process TREE.
    
    It's usefull, when we dump tasks from another pid namespace,
    because a real pid is got from parasite. In previous version
    we need to update pid in two places one is in a pstree_item and
    one is in a children array.
    
    A process tree will be necessery to restore sid and pgid,
    because we should add fake tasks in a tree. For example if
    a sesion leader is absent.
    
    v2: fix rollback actions
    v3: fix comments from Pavel Emelyanov
        * add macros for_each_pstree_item
        * and a few bugs
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    cf63c1d9
cr-show.c 13.6 KB