EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>

This commit is contained in:
Denis Vlasenko
2007-02-06 01:20:12 +00:00
parent cc24419e98
commit 1d76f439da
22 changed files with 39 additions and 28 deletions

View File

@ -33,6 +33,6 @@ int chroot_main(int argc, char **argv)
argv[1] = (char *) "-i";
}
execvp(*argv, argv);
BB_EXECVP(*argv, argv);
bb_perror_msg_and_die("cannot execute %s", *argv);
}

View File

@ -81,7 +81,7 @@ int env_main(int argc, char** argv)
}
if (*argv) {
execvp(*argv, argv);
BB_EXECVP(*argv, argv);
/* SUSv3-mandated exit codes. */
xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
bb_perror_msg_and_die("%s", *argv);

View File

@ -126,7 +126,7 @@ int install_main(int argc, char **argv)
ret = EXIT_FAILURE;
}
if (flags & OPT_STRIP) {
if (execlp("strip", "strip", dest, NULL) == -1) {
if (BB_EXECLP("strip", "strip", dest, NULL) == -1) {
bb_perror_msg("strip");
ret = EXIT_FAILURE;
}

View File

@ -47,7 +47,7 @@ int nice_main(int argc, char **argv)
}
}
execvp(*argv, argv); /* Now exec the desired program. */
BB_EXECVP(*argv, argv); /* Now exec the desired program. */
/* The exec failed... */
xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */

View File

@ -53,7 +53,7 @@ int nohup_main(int argc, char **argv)
close(nullfd);
signal(SIGHUP, SIG_IGN);
execvp(argv[1], argv+1);
BB_EXECVP(argv[1], argv+1);
if (ENABLE_FEATURE_CLEAN_UP && home)
free((char*)nohupout);
bb_perror_msg_and_die("%s", argv[1]);