diff options
author | Jim Meyering <jim@meyering.net> | 1998-12-11 13:37:52 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-12-11 13:37:52 +0000 |
commit | a17cdb11731e3a557f3274ae566c39bd137d0640 (patch) | |
tree | 5a4a9485f231ed581b93401e0174fe972ec827b4 | |
parent | b2747b91a856aa2fc65a5f2e62e1be2ef66b5dde (diff) | |
download | coreutils-a17cdb11731e3a557f3274ae566c39bd137d0640.tar.xz |
(main): Arrange to exit unsuccessfully when stime fails.
From Andreas Schwab.
-rw-r--r-- | src/date.c | 5 |
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 |