Timed reads on Cygwin timeout immediately #1289
Description
After several weeks of effort I've gotten the unit test failures on Cygwin down to just signal.sh. The failure of that unit test is because timed reads (e.g., read -t5 -u9 x
) timeout immediately. What is weird is the underlying read()
syscall returns -1 with errno == 70. But errno 70 is ECOMM
which makes no sense in this context. Nonetheless, both a DPRINTF()
added here and the output from running the test via strace
show that to be true:
ast/src/lib/libast/sfio/sfrd.c
Lines 256 to 258 in 6b0910a
Also weird is that the timedout()
function is never called:
ast/src/cmd/ksh93/bltins/read.c
Lines 418 to 422 in 6b0910a
And that function should be called as a result of the timer alarm firing; even if the timer expires too early. I've confirmed that on all other platforms it is called when a timeout occurs. For the moment I'm just going to bypass the problematic tests on Cygwin.