I know that tty line discipline processes special characters (such as ^C, ^? and etc), but it is only about input from pty master device. But what about input from pty slave device? What tty line discipline does with input from pty slave device? Where can I find some code examples?
Asked
Active
Viewed 1,023 times
1 Answers
0
Line discipline doesn't apply to pty master device, which is simply a interface to receive or send bytes to "generic tty".
A generic tty is basically a tty device (either /dev/ttyx or pty slave device) with a line discipline, which transform the bytes from another end (either kernel terminal emulator or pty master device) into certain signals or do line-buffer-editing

炸鱼薯条德里克
- 1,375
But I can't find read() method realization neither in tty line discipline nor in pts driver. So how scanf function behaves when trying to read from tty?
– TwITe Jul 12 '19 at 15:51stty
shows me only settings of the current tty device (which is pts device on my gnome-terminal). I would want to know it for sure. my assumptions is that ldisc of pty master set to raw mode and ldisc of /dev/tty/N also set to raw mode, but I want to know it for sure – TwITe Jul 14 '19 at 08:12