rusl 0.5.0

Rust linux interface layer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use sc::syscall;

use crate::platform::CloneFlags;

/// Unshare the properties specified by `CloneFlags` with other processes.
/// See the [Linux docs for details](https://man7.org/linux/man-pages/man2/unshare.2.html)
/// # Errors
/// See above
pub fn unshare(flags: CloneFlags) -> crate::Result<()> {
    let res = unsafe { syscall!(UNSHARE, flags.bits()) };
    bail_on_below_zero!(res, "`UNSHARE` syscall failed");
    Ok(())
}