FRIDAY, APRIL 17, 2026
libio — Under Review
libio: Seeking feedback on fmemopen_write fix
Rocket Ma is pinging for feedback on a patch to fix `fmemopen_write` in appending condition.
Rocket Ma is requesting feedback on version 2 of a patch that aims to fix fmemopen_write when used in appending condition. The patch’s approach is under discussion, particularly regarding how it handles buffer size and potential inconsistencies with setbuf.
Technical Tradeoffs
- The proposed fix involves directly setting the buffer to NULL, rejecting `setbuf` requests, and returning `EINVAL` if space is insufficient. This approach may limit flexibility.
- Alternative approaches, such as adding a specific size of allocated buffer function, may introduce inconsistencies if the user sets the buffer manually.