• Iago López Galeiras's avatar
    fs, proc: introduce CONFIG_PROC_CHILDREN · 2e13ba54
    Iago López Galeiras authored
    Commit 81841161 ("fs, proc: introduce /proc/<pid>/task/<tid>/children
    entry") introduced the children entry for checkpoint restore and the
    file is only available on kernels configured with CONFIG_EXPERT and
    CONFIG_CHECKPOINT_RESTORE.
    
    This is available in most distributions (Fedora, Debian, Ubuntu, CoreOS)
    because they usually enable CONFIG_EXPERT and CONFIG_CHECKPOINT_RESTORE.
    But Arch does not enable CONFIG_EXPERT or CONFIG_CHECKPOINT_RESTORE.
    
    However, the children proc file is useful outside of checkpoint restore.
    I would like to use it in rkt.  The rkt process exec() another program
    it does not control, and that other program will fork()+exec() a child
    process.  I would like to find the pid of the child process from an
    external tool without iterating in /proc over all processes to find
    which one has a parent pid equal to rkt.
    
    This commit introduces CONFIG_PROC_CHILDREN and makes
    CONFIG_CHECKPOINT_RESTORE select it.  This allows enabling
    /proc/<pid>/task/<...
    2e13ba54
Kconfig 64.1 KB