Pádraig Brady <p...@draigbrady.com> [2023-02-05 19:13:15 +0000]: > > On 05/02/2023 16:56, Glenn Golden wrote: > > Your two patches (the one mentioned above and the earlier one avoiding the > > xlseek() on a non-regular file) do almost fix the problem, but not quite. > > I added one additional mod, and with that, it now seems to address the > > issue fully. (And doesn't seem to break any "make check" tests.) > > Oh right I see. Sorry for missing that. > After an fd change we need to go around the loop again > to reinit the local fd and also guard against fd==-1 etc. > Previously we always went around the loop again after a recheck() > so any previous use of fd was fine. >
Aha, yes, I see what you did there by just adding fd != f[i].fd as an additional condition to force the 'continue' after the recheck. Much cleaner and more general than the way I had done it. > > Attaching the final two patches I hope to apply for this. > They should apply to coreutils-9.1 > Yes, confirming those patches do apply cleanly to 9.1, and do fix the issue. Thanks Pádraig, Glenn