It's a bit of a shame that this fella went to all of that trouble digging through Illumos.

https://youtube.com/v/tUqHsv6JarY?lc=UgwAiVOVkz-sP_j-H7J4AaABAg

#Illumos is one of the few platforms that does not have the <sys/ttydefaults.h> header from 4BSD. It was ironically quite the wrong place to look. The GNU and musl C libraries have the header, as do all of #FreeBSD, #OpenBSD, and #NetBSD.

The problem is that although <sys/ttydefaults.h> has been around since 1983 (1993 in its current form), almost no-one, apart from people like me who write terminal emulators and whatnot and cannot just use cfmakesane(), knows that it is there. It isn't in any manual.

Which leads to things like stty in GNU coreutils going all around the houses to do something simple, too.

#ttydefaults #termios #stty

The `reset` and `clear` unix terminal commands are complex - let's rewrite them (deep-dive)

YouTube