Check for write errors; report and exit with error value.
This commit is contained in:
parent
ac3fcecc22
commit
bf121d8ed4
@ -175,6 +175,8 @@ main(int argc, char *argv[])
|
||||
vary_destroy(v);
|
||||
(void)strftime(buf, sizeof(buf), format, <);
|
||||
(void)printf("%s\n", buf);
|
||||
if (fflush(stdout))
|
||||
err(1, "stdout");
|
||||
exit(retval);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user