aboutsummaryrefslogtreecommitdiff
path: root/miscutils/crond.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-26 12:29:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-26 12:29:59 +0000
commitf09f4e015bffe6db5d7e63d47b23f22db4806736 (patch)
tree38393e9a60430aa64541370c68151101e62a64ec /miscutils/crond.c
parent48637e0924dcd13629ebf3aeffa80cdda1beb5af (diff)
downloadbusybox-w32-f09f4e015bffe6db5d7e63d47b23f22db4806736.tar.gz
busybox-w32-f09f4e015bffe6db5d7e63d47b23f22db4806736.tar.bz2
busybox-w32-f09f4e015bffe6db5d7e63d47b23f22db4806736.zip
runsv: small optimization
*: more paranoia around passing NULL to execl[e] function old new delta custom 240 221 -19
Diffstat (limited to 'miscutils/crond.c')
-rw-r--r--miscutils/crond.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index b2fedb152..767aa120a 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -775,7 +775,7 @@ ForkJob(const char *user, CronLine *line, int mailFd,
775 } 775 }
776 /* crond 3.0pl1-100 puts tasks in separate process groups */ 776 /* crond 3.0pl1-100 puts tasks in separate process groups */
777 bb_setpgrp(); 777 bb_setpgrp();
778 execlp(prog, prog, cmd, arg, NULL); 778 execlp(prog, prog, cmd, arg, (char *) NULL);
779 crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg); 779 crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg);
780 if (mail_filename) { 780 if (mail_filename) {
781 fdprintf(1, "Exec failed: %s -c %s\n", prog, arg); 781 fdprintf(1, "Exec failed: %s -c %s\n", prog, arg);
@@ -912,7 +912,7 @@ static void RunJob(const char *user, CronLine *line)
912 } 912 }
913 /* crond 3.0pl1-100 puts tasks in separate process groups */ 913 /* crond 3.0pl1-100 puts tasks in separate process groups */
914 bb_setpgrp(); 914 bb_setpgrp();
915 execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL); 915 execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, (char *) NULL);
916 crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, 916 crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user,
917 DEFAULT_SHELL, "-c", line->cl_Shell); 917 DEFAULT_SHELL, "-c", line->cl_Shell);
918 _exit(EXIT_SUCCESS); 918 _exit(EXIT_SUCCESS);