std.ps.tcgetpgrp

std.ps

tcgetpgrp(fd) -> pgid

Get the foreground process group of a terminal

Returns the process group ID of the foreground process group of the terminal associated with the file descriptor fd.