mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-09 17:13:08 -10: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:
1 parent
5903d9c00b
commit
cb46f47c79
1 file changed
+2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user