Page MenuHomeFreeBSD

comm: close a race condition when comm is fed from stdin
ClosedPublic

Authored by ccecchi_apple.com on Jun 1 2024, 3:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 10 2024, 11:19 PM
Unknown Object (File)
Nov 3 2024, 4:05 AM
Unknown Object (File)
Oct 18 2024, 4:16 PM
Unknown Object (File)
Oct 5 2024, 5:22 AM
Unknown Object (File)
Oct 5 2024, 3:21 AM
Unknown Object (File)
Sep 27 2024, 1:48 AM
Unknown Object (File)
Sep 16 2024, 10:23 AM
Unknown Object (File)
Sep 7 2024, 3:42 AM
Subscribers

Details

Summary

If one of the files has ended, we won't show the column, but we still
need to drain the file pointer to avoid potentially hitting a pipe
failure.

This commit moves the NULL offset checks inside show() so that getline()
and ferror() are still called on fp.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable