Bug 195899
Summary: | reboot(2): inaccurate text about interaction with pid namespaces | ||
---|---|---|---|
Product: | Documentation | Reporter: | Michał Zegan (webczat) |
Component: | man-pages | Assignee: | documentation_man-pages (documentation_man-pages) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | mtk.manpages |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: |
Description
Michał Zegan
2017-05-28 19:47:24 UTC
ping Thanks for the report. Yes, the existing text was confused (mea culpa). I changed it to the following: Behavior inside PID namespaces Since Linux 3.4, if reboot() is called from a PID namespace other than the initial PID namespace with one of the cmd values listed below, it performs a "reboot" of that namespace: the "init" process of the PID namespace is immediately terminated, with the effects described in pid_namespaces(7). The values that can be supplied in cmd when calling reboot() in this case are as follows: LINUX_REBOOT_CMD_RESTART, LINUX_REBOOT_CMD_RESTART2 The "init" process is terminated, and wait(2) in the parent process reports that the child was killed with a SIGHUP signal. LINUX_REBOOT_CMD_POWER_OFF, LINUX_REBOOT_CMD_HALT The "init" process is terminated, and wait(2) in the parent process reports that the child was killed with a SIGINT signal. For the other cmd values, reboot() returns -1 and errno is set to EINVAL. I'll close this now. Please reopen if you see something that still needs fixing. |