pivot_root.2: Rework a "hanging" description into an earlier paragraph

The reference of "Note that this also applies" was vague. So
combine this paragraph with an earlier one to make the linkage
clearer.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-09-10 10:42:22 +02:00
parent aff78c76f7
commit 4a8b7d7b13
1 changed files with 6 additions and 7 deletions

View File

@ -38,6 +38,12 @@ at the old root operate correctly in either case.
An easy way to ensure this is to change their
root and current working directory to \fInew_root\fP before invoking
.BR pivot_root ().
Note also that
.BR pivot_root ()
may or may not affect the calling process's current working directory.
It is therefore recommended to call
\fBchdir("/")\fP immediately after
.BR pivot_root ().
.PP
The paragraph above is intentionally vague because the implementation of
.BR pivot_root ()
@ -54,13 +60,6 @@ of each process or thread in the same mount namespace to
if they point to the old root directory.
See also NOTES.
.PP
Note that this also applies to the calling process:
.BR pivot_root ()
may or may not affect its current working directory.
It is therefore recommended to call
\fBchdir("/")\fP immediately after
.BR pivot_root ().
.PP
The following restrictions apply:
.IP \- 3
.IR new_root