runsv: small optimization
*: more paranoia around passing NULL to execl[e] function old new delta custom 240 221 -19
This commit is contained in:
@@ -775,7 +775,7 @@ ForkJob(const char *user, CronLine *line, int mailFd,
|
||||
}
|
||||
/* crond 3.0pl1-100 puts tasks in separate process groups */
|
||||
bb_setpgrp();
|
||||
execlp(prog, prog, cmd, arg, NULL);
|
||||
execlp(prog, prog, cmd, arg, (char *) NULL);
|
||||
crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user, prog, cmd, arg);
|
||||
if (mail_filename) {
|
||||
fdprintf(1, "Exec failed: %s -c %s\n", prog, arg);
|
||||
@@ -912,7 +912,7 @@ static void RunJob(const char *user, CronLine *line)
|
||||
}
|
||||
/* crond 3.0pl1-100 puts tasks in separate process groups */
|
||||
bb_setpgrp();
|
||||
execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
|
||||
execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, (char *) NULL);
|
||||
crondlog(ERR20 "can't exec, user %s cmd %s %s %s", user,
|
||||
DEFAULT_SHELL, "-c", line->cl_Shell);
|
||||
_exit(EXIT_SUCCESS);
|
||||
|
Reference in New Issue
Block a user