[I should have CCed Adrian, so that he is aware of the issue also, having added Time Namespaces; Adrian, for context, see https://lore.kernel.org/util-linux/20200427093346.tcoujcasylusejfq@xxxxxxxxxxx/T/#t ] On Mon, 27 Apr 2020 at 11:33, Karel Zak <kzak@xxxxxxxxxx> wrote: > > On Fri, Apr 24, 2020 at 11:21:15AM +0200, Michael Kerrisk wrote: > > On Sun, Apr 19, 2020 at 1:06 AM michael-dev <michael-dev@xxxxxxxxxxxxx> wrote: > > > > > > Am 16.04.2020 22:49, schrieb ebiederm@xxxxxxxxxxxx: > > > > Why all of the extra code motion and change? > > > > > > > > Your description sounds like only the first hunk is necessary. Did > > > > something else get mixed into this change? Or are all of the hunks > > > > necessary? > > > > > > Because after unsharing, pid_for_children is a dangling symlink. > > > So if (forkit) needs to be before /* wait for bind_ns_files_from_child() > > > */. > > > Moving this results in an overlapping use of the pid variable, so that > > > gets renamed. > > > Additionally, we cannot wait for the forkit child (bash) to exit before > > > triggering and waiting for the bind-mounting child to bind-mount the > > > persistent namespace. So forking and waiting for the forkit child (bash) > > > needs to become splitted. > > > > @Michael: I confim theproblem, and thanks for this fix. > > > > @Zak: an analogous fix is required for time namespaces. > > OK, I'll play with it later this week. Sorry for the delay, I'm busy > with other things. Thanks, Karel! -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/