git: 506321178137 - main - ctags: Error out if writing to stdout failed.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 May 2023 15:31:35 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=506321178137b9d78d81bd971671e7bb51c3ecf0 commit 506321178137b9d78d81bd971671e7bb51c3ecf0 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-05-23 15:31:28 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-05-23 15:31:28 +0000 ctags: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: cracauer, allanjude Differential Revision: https://reviews.freebsd.org/D40200 --- usr.bin/ctags/ctags.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index 3e933f033b3f..409b07f5354b 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -218,6 +218,8 @@ nextline: } } } + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(exit_val); }