summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-12-11 13:37:52 +0000
committerJim Meyering <jim@meyering.net>1998-12-11 13:37:52 +0000
commita17cdb11731e3a557f3274ae566c39bd137d0640 (patch)
tree5a4a9485f231ed581b93401e0174fe972ec827b4 /src
parentb2747b91a856aa2fc65a5f2e62e1be2ef66b5dde (diff)
downloadcoreutils-a17cdb11731e3a557f3274ae566c39bd137d0640.tar.xz
(main): Arrange to exit unsuccessfully when stime fails.
From Andreas Schwab.
Diffstat (limited to 'src')
-rw-r--r--src/date.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/date.c b/src/date.c
index bf5b565b4..79eaf4f03 100644
--- a/src/date.c
+++ b/src/date.c
@@ -344,7 +344,10 @@ argument must be a format string beginning with `+'."),
/* Set the system clock to the specified date, then regardless of
the success of that operation, format and print that date. */
if (stime (&when) == -1)
- error (0, errno, _("cannot set date"));
+ {
+ error (0, errno, _("cannot set date"));
+ status = 1;
+ }
}
/* When given a universal time option, set TZ to UTC0 after