aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2026-05-03 10:20:07 +0100
committerRon Yorston <rmy@pobox.com>2026-05-03 10:52:29 +0100
commitced42f811a96ed3910bcb03158f33bd01ed923c8 (patch)
tree35308811361ccb5c244f38971940cb8686ecbd03 /miscutils
parentc23112c3a0bbf1d07f03b3c07fe96b5b4c5271f1 (diff)
downloadbusybox-w32-ced42f811a96ed3910bcb03158f33bd01ed923c8.tar.gz
busybox-w32-ced42f811a96ed3910bcb03158f33bd01ed923c8.tar.bz2
busybox-w32-ced42f811a96ed3910bcb03158f33bd01ed923c8.zip
crond: build tweaks
Using 'depends on FEATURE_SYSLOG' is unreliable because FEATURE_SYSLOG can't be set directly. A POSIX build with all applets that need syslog disabled *except* crond may fail. Revert to using 'select FEATURE_SYSLOG' in crond and exclude the unused syslog code on Windows. If crond is unable to run sendmail report this in the error message. Update all default Windows configurations. (GitHub PR #561)
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index bbb312882..c1e90440a 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -11,7 +11,7 @@
11//config:config CROND 11//config:config CROND
12//config: bool "crond (15 kb)" 12//config: bool "crond (15 kb)"
13//config: default y 13//config: default y
14//config: depends on FEATURE_SYSLOG || PLATFORM_MINGW32 14//config: select FEATURE_SYSLOG
15//config: help 15//config: help
16//config: Crond is a background daemon that parses individual crontab 16//config: Crond is a background daemon that parses individual crontab
17//config: files and executes commands on behalf of the users in question. 17//config: files and executes commands on behalf of the users in question.
@@ -761,7 +761,7 @@ fork_job(const char *user, int mailFd, CronLine *line, bool run_sendmail)
761 /* Using the fd as input doesn't appear to work with external programs */ 761 /* Using the fd as input doesn't appear to work with external programs */
762 shell_arg = (char *)"sh -c \""SENDMAIL" "SENDMAIL_ARGS"\""; 762 shell_arg = (char *)"sh -c \""SENDMAIL" "SENDMAIL_ARGS"\"";
763 if ((fdpipe = mingw_popen_fd("sh", shell_arg, "w", -1, &pid)) == -1) 763 if ((fdpipe = mingw_popen_fd("sh", shell_arg, "w", -1, &pid)) == -1)
764 bb_perror_msg("can't execute '%s'", "sh"); 764 bb_perror_msg("can't execute '%s'", SENDMAIL);
765 765
766 bb_copyfd_eof(mailFd, fdpipe); 766 bb_copyfd_eof(mailFd, fdpipe);
767 close(fdpipe); 767 close(fdpipe);