Skip to content

injaelee/tutorial.pseudoterminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pseudo Terminal (PTY) Tutorial

OS PseudoTTY (PTY) explanations, mechanics, and C code

Overview

TODO

Experiment with 'openpty' and 'login_tty' which simplify the handling of creating master and slave PTY file descriptors.

Key Concepts/Points

-- 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

Instructions

gcc bash.pty.c -o bash.pty
gcc ping.back.c -o ping.back

About

OS PseudoTTY (PTY) explanations, mechanics, and C code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages