Executes ioctl with the TIOCGPGRP option.
fn ioctl_tiocgpgrp(fd: i32, id: &mut i32) -> i32
The file descriptor on which to operate.
Place where the process group id of the foreground process group will be stored.
tty_ioctl(2)