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::PidT;

/// Sets process group id `grp_pid` to the process specified py `set_pid`
/// See [Linux documentation for detials](https://man7.org/linux/man-pages/man2/getpgrp.2.html)
/// # Errors
/// See above
#[inline]
pub fn setpgid(set_pid: PidT, grp_pid: PidT) -> crate::Result<()> {
    let res = unsafe { syscall!(SETPGID, set_pid, grp_pid) };
    bail_on_below_zero!(res, "`SETPGID` syscall failed");
    Ok(())
}