@James -- ok I can trigger this error from the test program as well on amd64. However after some poking I think this test case is flawed. I made the read retry if it did not see a 14 long string and in the tests I have run all failures show the newline is there:
loop 39225 of 99999
ret = 14
loop 39226 of 99999
ret = 12
ret = 2
ret = -1
So I suspect that the pty newline mangling is allowing this single write at the dash end to be split into two read at your consumer.
@James -- ok I can trigger this error from the test program as well on amd64. However after some poking I think this test case is flawed. I made the read retry if it did not see a 14 long string and in the tests I have run all failures show the newline is there:
loop 39225 of 99999
ret = 14
loop 39226 of 99999
ret = 12
ret = 2
ret = -1
So I suspect that the pty newline mangling is allowing this single write at the dash end to be split into two read at your consumer.