]> git.ipfire.org Git - thirdparty/util-linux.git/commit - sys-utils/unshare.1
unshare: support the time namespace
authorAdrian Reber <areber@redhat.com>
Fri, 6 Mar 2020 11:05:00 +0000 (12:05 +0100)
committerAdrian Reber <areber@redhat.com>
Sun, 8 Mar 2020 18:02:00 +0000 (19:02 +0100)
commitbe7df01a62d1284debc6dbe8a77677795b6876ea
treef36ef2c90aa3bb50f9b51dbf394196f32c18e917
parent6671501cfa2c49f201d3928d65dd538d3ef5c9cc
unshare: support the time namespace

This adds support to unshare for time namespaces. With the newly added
options '-t, --time' and '--monotonic' and '--boottime' it is now
possible to change CLOCK_MONOTONIC and CLOCK_BOOTTIME in a new time
namespace.

The time namespace has been merged in kernel version 5.6 and an easy way
to test it is using CLOCK_BOOTTIME and the uptime command:

 # uptime
 11:08:26 up 20:28,  1 user,  load average: 0.00, 0.00, 0.00
 # ./unshare --fork --time --boottime 100000000 uptime
 11:08:29 up 1158 days,  6:15,  1 user,  load average: 0.00, 0.00, 0.00

Signed-off-by: Adrian Reber <areber@redhat.com>
bash-completion/unshare
include/namespace.h
sys-utils/unshare.1
sys-utils/unshare.c