OS PseudoTTY (PTY) explanations, mechanics, and C code
Experiment with 'openpty' and 'login_tty' which simplify the handling of creating master and slave PTY file descriptors.
-- PTY Related API's
posix_openpt
grantpt
unlockpt
ptsname
-- Process Related API's
fork
-- Terminal Related API's
tcgetattr
cfmakeraw
tcsetattr
-- I/O Related API's
close
read
write
dup
FD_ZERO
FD_SET
select
ioctl
-- Symbolic Related API's
setsid
gcc bash.pty.c -o bash.pty
gcc ping.back.c -o ping.back