The fact remains that POSIX does not require process exit signal / TTY
flush synchronization, and I know of no Unix that ensures that these
things are synchronized. Your musings about what constitutes 'the device'
are thus not terribly relevant. The system simply does not work the way
you would like it to (and the way some app authors assume).