Namespaces in operation, part 4: more on PID namespaces
Namespaces in operation, part 4: more on PID namespaces
Posted Feb 13, 2019 10:02 UTC (Wed) by mkerrisk (subscriber, #1978)In reply to: Namespaces in operation, part 4: more on PID namespaces by ywchang
Parent article: Namespaces in operation, part 4: more on PID namespaces
As described in the article, the setns() and unshare() system calls treat PID namespaces specially. For other types of namespaces, these system calls do change the namespace of the caller. For PID namespaces, these system calls do not change the PID namespace of the calling process. Instead, any subsequently created children of the caller will be created in the target/new namespace.
If the -f option was omitted, the ns_run command would execute the orphan program in the PID namespace where ns_run resides, rather than the namespace specified by the -n option.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
