[git commit] date: return failure exit code on clock_settime error
Denys Vlasenko
vda.linux at googlemail.com
Wed Jul 30 17:44:39 UTC 2025
commit: https://git.busybox.net/busybox/commit/?id=427f80873274c9e4d3860a193e6f1e82b0f61997
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
coreutils/date.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/coreutils/date.c b/coreutils/date.c
index 3a89b6caf..ef482af1b 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -289,7 +289,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
/* if setting time, set it */
if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) {
- bb_simple_perror_msg("can't set date");
+ bb_simple_perror_msg_and_die("can't set date");
}
}
More information about the busybox-cvs
mailing list