Closed perimosocordiae closed 2 years ago
This actually has nothing to do with the file api. A smaller reproducer:
c ::= import "c/stdio.ic"
unused ::= import "empty.ic"
c.perror("".data)
Somehow during import we're setting errno
but never clearing it.
I'm really stumped on this one. Reproduce by creating an empty file named
empty.ic
and the following content intest.ic
in the same directory:When I run this as is, I get:
(where error code 2 is ENOENT, see gh-86 for my feature request on that). But if you then comment out the line where we import empty.ic, the read completes as expected: