On Tue, Apr 15, 2025 at 9:17 PM Jim Meyering wrote: ... > We're going to have to revise that code. > The difference I see is that before rawhide, that fclose would fail. > It's perfectly fine for fclose to succeed in this case, as now happens > on rawhide (because with 4k BUFSIZ, the fclose wrote nothing -- the > preceding 4096-byte write is what failed). > > Here's a better patch: (technically, we could factor it somewhat, but > readability would suffer disproportionately) I didn't take the time to find a precise commit, but this bug predates the move from closeout.c to gnulib's close-stdout.c in 2006. As I write this, I'm installing Fedora 42. I'll probably push the attached to gnulib tomorrow: