Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Timed reads on Cygwin timeout immediately #1289

Open
@krader1961

Description

@krader1961

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:

} else {
r = read(f->file, buf, n);
}

Also weird is that the timedout() function is never called:

static_fn void timedout(void *handle) {
struct timeout *tp = (struct timeout *)handle;
sfclrlock(tp->iop);
sh_exit(tp->shp, 1);
}

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions