NEWPID(1) | NEWPID(1) |
newpid - launch a command in a new PID namespace
newpid [-inNu] command
newpid uses the clone(CLONE_NEWPID) syscall to launch a command in a new PID namespace. The /proc filesystem is remounted so the new process IDs are also visible there.
$ newpid ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND myon 1 0.0 0.0 4080 84 pts/3 S+ 12:15 0:00 newpid ps aux myon 2 0.0 0.0 19984 1316 pts/3 R+ 12:15 0:00 ps aux $ ./newpid -n ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
Christoph Berg <myon@debian.org>
2019-02-18 |