fork() -> (pid, master_fd) Fork and make the child a session leader with a controlling terminal.
pty/fork
fork