Theme 1 – The PTY/terminal abstraction is leaky and fragmented > “The kernel/terminal/application split is a leaky abstraction in practice — you only find out by hosting one inside the other.” – jonnyasmar
Theme 2 – TTY detection quirks (isatty vs. stat, stdin/stdout splits) > “Tools that detect “am I in a TTY” via isatty() behave differently from tools that stat() stdin.” – jonnyasmar
“...how do you even use fstat’s output to find out if the file is a tty?” – Joker_vD
Theme 3 – Practical work‑arounds to avoid hanging interactive code > “You only need one script to hang forever waiting for a user to type in a password to decide that you’ll force the issue going forward.” – mpyne
“The fix was the same as yours —
< /dev/nulleverywhere, treat any stdin attach as an error.” – jonnyasmar