Comment 11 for bug 1066351

Revision history for this message
James Hunt (jamesodhunt) wrote :

Interestingly, I tried running the test program on FreeBSD, but that fails. I believe the reason is that on BSD, if the process connected to the master end of the pty has unflushed data that the slave end hasn't yet read, and the master process is killed, the kernel discards the unflushed data and read returns EOF.

I've also took a peak at the the Linux tty layer and, before I ran away screaming, I did see that '\n' is special-cased in a number of places. This isn't to say the bug is with the kernel necessarily (no evidence yet!), but it's still a possibility unless I've done something very silly in the test program :-)