]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(main): Arrange to exit unsuccessfully when stime fails.
authorJim Meyering <jim@meyering.net>
Fri, 11 Dec 1998 13:37:52 +0000 (13:37 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 11 Dec 1998 13:37:52 +0000 (13:37 +0000)
From Andreas Schwab.

src/date.c

index bf5b565b460ebd008d03dd3779fe71917d2aa31f..79eaf4f036a8f63d2e554d9ea37921465deab217 100644 (file)
@@ -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