diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -172,6 +172,8 @@ (void)printf("%s%s\n", col2, line2); } } + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); }