Re: with- and without- tty mode procedures
Lassi Kortela 15 Aug 2019 16:15 UTC
> I'm still thinking we should expose below these fancy procedures the
> system calls, struct, and flags primitives they use to get and set
> line disciplines.
The line discipline stuff won't apply to the Windows console. (Well, now
they run a Linux kernel in there, but the classic console still exists.)
For Unix, there's now:
struct termios orig_mode;
struct termios raw_mode;
cfmakeraw(&raw_mode);
tcgetattr(term_fd, &orig_mode);
tcsetattr(term_fd, TCSAFLUSH, &raw_mode);
// ...
tcsetattr(term_fd, TCSAFLUSH, &orig_mode);
I have some fairly full-featured terminal stuff implementing a line
editor and fullscreen display that doesn't need any other line
discipline or ioctl stuff.
What is the worst that happend from a user's point of view in the
failure mode suggested by Harold (I didn't understand all the details)?
If it's only a couple of lost characters or screen update problem, well,
those happen on a daily basis with all terminal programs :)