pty terminal packet mode TIOCPKT

孤者浪人 提交于 2019-12-02 00:47:57

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!