Closed talex5 closed 1 year ago
This also fixes an issue I was seeing where EIO reported successful writes on closed file descriptors.
This also fixes an issue I was seeing where EIO reported successful writes on closed file descriptors.
Closing a file prevents new write operations from starting, but existing ones may be allowed to complete. I don't see why this PR should affect that; the bug will cause an extra wake-up but the write should just get EAGAIN and go back to sleep immediately.
I was a bit nervous about the assert
but it appears the logic is sound. I ran some long-running load tests and the program did not crash or exhibit any pathological behaviour.
Thanks for the quick response 👍
If cancelling removes the last waiter, we need to update the set of FDs being watched.
Fixes #572.
Reported by @quernd