diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c index b8fb10ccddb4..2f305e23ce8f 100644 --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -172,6 +172,8 @@ main(int argc, char *argv[]) (void)printf("%s%s\n", col2, line2); } } + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); }