If the file is truncated during processing the loop will spin forever.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196694
Differential D2351
Handle truncation while processing a file darius-dons.net.au on Apr 23 2015, 3:05 AM. Authored by Tags None Referenced Files
Details If the file is truncated during processing the loop will spin forever. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196694 I put a break point in the loop and truncated the file, previously it would spin forever, with the change it doesn't.
Diff Detail
Event TimelineComment Actions Based on internal testing done and the fact that this change is shipping in current versions of OneFS, I say, ShipIt! Comment Actions Looks good to me, the code should take read(2) returning 0 as a signal for breaking the loop. |