I'm working on test. When I try to start a PID namespace and set it to background, it looks work and I get the prompt. But if I try to run any else, whenever I type the first character, the session just close. This is also the same if I change bash to sh.

    [root@opensshtest ~]# unshare --fork --pid /bin/bash &
    [1] 10136
    [root@opensshtest ~]# [root@opensshtest ~]# elogout
    Connection to opensshtest.cn.ibm.com closed.

But for other type namespace, it works fine. Like

    [root@opensshtest ~]# unshare --fork --uts /bin/bash &
    [1] 10372
    [root@opensshtest ~]# jobs
    [1]+  Stopped                 unshare --fork --uts /bin/bash
    [root@opensshtest ~]#

Is this operation limited for PID namespace and not supported? Any document define this?

0

There are 0 best solutions below