Skip to content

Commit

Permalink
feat: add CLONE_NEWTIME flag for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Jan 3, 2025
1 parent 29bbd8e commit 8d0d2e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/sched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ mod sched_linux_like {
CLONE_NEWNET;
/// The new process shares an I/O context with the calling process.
CLONE_IO;
/// Unshare the time namespace, so that the calling process has a
/// new time namespace for its children which is not shared with
/// any previously existing process. The calling process is not
/// moved into the new namespace. Use of `CLONE_NEWTIME` requires
/// the `CAP_SYS_ADMIN` capability. For further information, see
/// [`time_namespaces(7)`](https://man7.org/linux/man-pages/man7/time_namespaces.7.html).
#[cfg(all(target_os = "linux", target_env = "gnu"))]
CLONE_NEWTIME;
}
}

Expand Down

0 comments on commit 8d0d2e0

Please sign in to comment.