public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [Bug 217547] New: The shell example in time_namespaces doesn't behave as documented
@ 2023-06-13 15:00 bugzilla-daemon
  2023-06-25 12:06 ` [Bug 217547] " bugzilla-daemon
  2023-06-25 15:59 ` bugzilla-daemon
  0 siblings, 2 replies; 3+ messages in thread
From: bugzilla-daemon @ 2023-06-13 15:00 UTC (permalink / raw)
  To: linux-man

https://bugzilla.kernel.org/show_bug.cgi?id=217547

            Bug ID: 217547
           Summary: The shell example in time_namespaces doesn't behave as
                    documented
           Product: Documentation
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: man-pages
          Assignee: documentation_man-pages@kernel-bugs.osdl.org
          Reporter: goeran@uddeborg.se
        Regression: No

Trying the shell example in the manual page for time_namespaces(7) does not
behave for me the way the manual page says it should. From what I can tell, it
appears that the new shell ITSELF immediately enters the new namespace, rather
than allowing for children to enter. This makes it impossible to write anything
to the time_for_children file.

Using the --boottime flag to unshare gives the expected behavior. Does an
exec() trigger entering the new time namespace nowadays? 

This was tested on a Fedora 38 system running kernel 6.2.14-300.fc38.

Example session:

kalle$$ readlink /proc/$$/ns/time
time:[4026531834]
kalle$$ LANG=en_US.utf8 PS1="ns2# " sudo unshare -T -- bash --norc
[sudo] password for göran: 
bash-5.2# echo "monotonic $((2*24*60*60)) 0" > /proc/$$/timens_offsets
bash: echo: write error: Permission denied
bash-5.2# readlink /proc/$$/ns/time
time:[4026532249]
bash-5.2# readlink /proc/$$/ns/time_for_children
time:[4026532249]

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-25 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13 15:00 [Bug 217547] New: The shell example in time_namespaces doesn't behave as documented bugzilla-daemon
2023-06-25 12:06 ` [Bug 217547] " bugzilla-daemon
2023-06-25 15:59 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox