arg0[0] = '-';
strcpy(arg0 + 1, shell_basename);
- execl(shell, arg0, NULL);
+ execl(shell, arg0, (char *)NULL);
errexec(shell);
}
shname = shname ? shname + 1 : shell;
if (command)
- execl(shell, shname, "-c", command, NULL);
+ execl(shell, shname, "-c", command, (char *)NULL);
else
- execl(shell, shname, "-i", NULL);
+ execl(shell, shname, "-i", (char *)NULL);
err(EXIT_FAILURE, "failed to execute %s", shell);
break;
fflush(NULL);
shell = (pw_entry->pw_shell && *pw_entry->pw_shell ?
pw_entry->pw_shell : _PATH_BSHELL);
- execl(shell, shell, (char *)0);
+ execl(shell, shell, (char *)NULL);
errexec(shell);
}
free(level);
}
#endif
- execl(su_shell, shell, NULL);
+ execl(su_shell, shell, (char *)NULL);
warn(_("failed to execute %s"), su_shell);
xsetenv("SHELL", "/bin/sh", 1);
- execl("/bin/sh", profile ? "-sh" : "sh", NULL);
+ execl("/bin/sh", profile ? "-sh" : "sh", (char *)NULL);
warn(_("failed to execute %s"), "/bin/sh");
}
err(EXIT_FAILURE, _("fork failed"));
if (!pid) {
- execlp(editor, p, tmp_file, NULL);
+ execlp(editor, p, tmp_file, (char *)NULL);
errexec(editor);
}
for (;;) {
err(EXIT_FAILURE, _("cannot set user id"));
if (ctl->p_option)
- execl("/bin/umount", "/bin/umount", name, "-n", NULL);
+ execl("/bin/umount", "/bin/umount", name, "-n", (char *)NULL);
else
- execl("/bin/umount", "/bin/umount", name, NULL);
+ execl("/bin/umount", "/bin/umount", name, (char *)NULL);
errexec("/bin/umount");
/* Execute shell */
if (shell) {
- execl(shell, shell_arg, NULL);
+ execl(shell, shell_arg, (char *)NULL);
errexec(shell);
}
if (access(shell, X_OK) == 0) {
if (command)
- execl(shell, shname, "-c", command, NULL);
+ execl(shell, shname, "-c", command, (char *)NULL);
else
- execl(shell, shname, "-i", NULL);
+ execl(shell, shname, "-i", (char *)NULL);
} else {
if (command)
- execlp(shname, "-c", command, NULL);
+ execlp(shname, "-c", command, (char *)NULL);
else
- execlp(shname, "-i", NULL);
+ execlp(shname, "-i", (char *)NULL);
}
err(EXIT_FAILURE, "failed to execute %s", shell);
if (access(shell, X_OK) == 0) {
if (command)
- execl(shell, shname, "-c", command, NULL);
+ execl(shell, shname, "-c", command, (char *)NULL);
else
- execl(shell, shname, "-i", NULL);
+ execl(shell, shname, "-i", (char *)NULL);
} else {
if (command)
- execlp(shname, "-c", command, NULL);
+ execlp(shname, "-c", command, (char *)NULL);
else
- execlp(shname, "-i", NULL);
+ execlp(shname, "-i", (char *)NULL);
}
err(EXIT_FAILURE, "failed to execute %s", shell);
break;
my_sigset(SIGQUIT, oldquit);
my_sigset(SIGTERM, oldterm);
execl(sh, sh, "-c",
- cmd.cmdline + 1, NULL);
+ cmd.cmdline + 1, (char *)NULL);
errexec(sh);
break;
}