posix: tcsetpgrp, tcgetpgrp (untested), and various fixes to c_cc handling - works in raw and canonical modes now.
TUI: when CTRL-key is pressed, don't do our own checks for SIGINT etc, but rather write an adjusted character to the terminal (eg, CTRL-C = 0x03).