pty terminal packet mode TIOCPKT pty terminal packet mode TIOCPKT unix unix

pty terminal packet mode TIOCPKT


The link you refer to is for SCO Unix, which has the STREAMS I/O subsystem. There is a pretty good overview of STREAMS here (its for Solaris, but same concepts apply to other *nixes).

The manual page tells you that you have to push the pckt module onto the stream, which is done with an ioctl() call with the I_PUSH command. The first link above should make this concept clearer, as it describes how STREAMS works.

But alas, Linux does not support STREAMS. To enable packet mode of a pty on linux, you call ioctl() with TIOCPKT as in the first link of yours.

The default when you create a new pty is normal (non packet) mode.