Revert "pipe: make read() return when write end is closed"
Oops, this was incorrect. The weak_count
test handles this, and this change causes it to return EOF when any file descriptor is dropped, if there are several.
The real cause of the issue I had was because it failed to set O_CLOEXEC
with fcntl()
, which wasn't clear because it didn't make any system call (since that function wasn't implemented in newlib) and git wasn't checking the return value. That is addressed in https://github.com/redox-os/newlib/pull/40.