The CLI, when run from TestRunner corrupts the user's terminal because of the above. The question really is: how com /dev/tty is still pointing at the user's terminal, and not the pty terminal.
Index: frysk-imports/frysk/sys/ChangeLog 2007-02-22 Andrew Cagney <cagney@redhat.com> * PseudoTerminal.java (RedirectStdio.reopen): Make native. * cni/PseudoTerminal.cxx (reopen): Implement; handle controlling terminal guff. * TestPseudoTerminal.java (testDevTty): Add.
Fixes committed, fhpd code correctly sets terminal to stty. (but how it does it is still wrong).