mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 12:23:58 +00:00
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 */
|
||||
tsort();
|
||||
if (ferror(stdout) != 0 || fflush(stdout) != 0)
|
||||
err(1, "stdout");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue