tsort: Error out if writing to stdout failed.
MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39959
This commit is contained in:
parent
5903d9c00b
commit
cb46f47c79
@ -183,6 +183,8 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* do the sort */
|
/* do the sort */
|
||||||
tsort();
|
tsort();
|
||||||
|
if (ferror(stdout) != 0 || fflush(stdout) != 0)
|
||||||
|
err(1, "stdout");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user