Why does cron(8) and crontab(1) need to setlocale()?

        Jan


Index: cron.c
===================================================================
RCS file: /cvs/src/usr.sbin/cron/cron.c,v
retrieving revision 1.77
diff -u -p -r1.77 cron.c
--- cron.c      23 Oct 2017 15:15:22 -0000      1.77
+++ cron.c      10 Feb 2020 12:12:13 -0000
@@ -28,7 +28,6 @@
 #include <err.h>
 #include <errno.h>
 #include <grp.h>
-#include <locale.h>
 #include <poll.h>
 #include <signal.h>
 #include <stdio.h>
@@ -83,8 +82,6 @@ main(int argc, char *argv[])
        struct sigaction sact;
        sigset_t blocked, omask;
        struct group *grp;
-
-       setlocale(LC_ALL, "");
 
        setvbuf(stdout, NULL, _IOLBF, 0);
        setvbuf(stderr, NULL, _IOLBF, 0);
Index: crontab.c
===================================================================
RCS file: /cvs/src/usr.sbin/cron/crontab.c,v
retrieving revision 1.93
diff -u -p -r1.93 crontab.c
--- crontab.c   28 Jun 2019 13:32:47 -0000      1.93
+++ crontab.c   10 Feb 2020 12:12:13 -0000
@@ -26,7 +26,6 @@
 #include <err.h>
 #include <errno.h>
 #include <limits.h>
-#include <locale.h>
 #include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
@@ -92,7 +91,6 @@ main(int argc, char *argv[])
        user_gid = getgid();
        crontab_gid = getegid();
 
-       setlocale(LC_ALL, "");
        openlog(__progname, LOG_PID, LOG_CRON);
 
        setvbuf(stderr, NULL, _IOLBF, 0);

Reply via email to