diff options
author | dds <dds@FreeBSD.org> | 2003-10-04 07:16:40 +0000 |
---|---|---|
committer | dds <dds@FreeBSD.org> | 2003-10-04 07:16:40 +0000 |
commit | bf121d8ed4a8372f9023c34336bf700497113f0d (patch) | |
tree | e9f9f42002825069974877c9017113543cb3af0b /bin/date | |
parent | ac3fcecc22637d0af58e2cafc2d51298ba5a3eca (diff) | |
download | FreeBSD-src-bf121d8ed4a8372f9023c34336bf700497113f0d.zip FreeBSD-src-bf121d8ed4a8372f9023c34336bf700497113f0d.tar.gz |
Check for write errors; report and exit with error value.
Diffstat (limited to 'bin/date')
-rw-r--r-- | bin/date/date.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/date/date.c b/bin/date/date.c index 725a435..c71f9d3 100644 --- a/bin/date/date.c +++ b/bin/date/date.c @@ -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); } |