rusl 0.5.0

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

use crate::platform::GidT;

/// Sets the process' group id to the provided `gid`
/// See [Linux documentation for details](https://man7.org/linux/man-pages/man2/setgid.2.html)
/// # Errors
/// See above
#[inline]
pub fn setgid(gid: GidT) -> crate::Result<()> {
    let res = unsafe { syscall!(SETGID, gid) };
    bail_on_below_zero!(res, "`SETGID` syscall failed");
    Ok(())
}