getpgrp

Function getpgrp 

Source
pub fn getpgrp() -> pid_t
Expand description

Get the process group ID of the current process see getpgrp(2)

Returns the process group ID of the calling process. This function is always successful and cannot fail according to POSIX specification.

ยงExample

use fork::getpgrp;

let pgid = getpgrp();
println!("Current process group ID: {}", pgid);