lam: fix using stdin more than once
Historically, lam(1) closes stdin once we've hit EOF the first time,
which would stop it from doing anything else on subsequent gatherline()
calls with another openfile. However, this doesn't seem to be strictly
necessary- the EOF flag on FILEs is quite sticky, so we can assume that
a subsequent fgetc(stdin) will flag EOF properly.
This 'fixes' the below-referenced commit in the sense that it surfaced
this problem as a fatal error, but the issue was pre-existing. If we
do `lam - -`, then one gatherline() will fclose(stdin) and set `ip->eof`
for *that* openfile, while the next one will then observe that
STDIN_FILENO has been closed and turn it into an EBADF.
Add a few tests that were easy to snipe while I'm here, but I haven't
aimed for anything close to exhaustive because I think re@ would prefer
this fix go in sooner rather than later to land in 15.0.
Minor style adjustment for the previous commit while we're here.
[8 lines not shown]
sysutils/gol: New port: All-in-one log viewer in browser
gol is a fast and lightweight log viewer that allows you to view
logs in real time from different sources (files, Docker logs, remote
via SSH, piped inputs, etc.) from a web browser.
boot.config.5: Clarify that this controls legacy boot blocks
Reviewed by; ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52460
GitHub: Enclose list of commit hashes in parens
Rather than superscript <sup>, for a nicer looking list.
Reviewed by: vexeduxr
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53000