Executes ioctl with the TIOCGSID option.
fn ioctl_tiocgsid(fd: i32, id: &mut i32) -> i32
The file descriptor on which to operate.
Place where the session id of the terminal will be stored.
tty_ioctl(2)