diff options
author | Denis Vlasenko | 2007-02-03 02:17:41 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-02-03 02:17:41 +0000 |
commit | 4921b54f37125a58d5ea1a8aac886ae781517bc1 (patch) | |
tree | d8a989b6b3c29db835d3ec3084b908b6199d91dc /libbb | |
parent | 0aa84906936bd99ea8627a24b8ad2fdeedc7e928 (diff) | |
download | busybox-4921b54f37125a58d5ea1a8aac886ae781517bc1.zip busybox-4921b54f37125a58d5ea1a8aac886ae781517bc1.tar.gz |
Add BB_EXEC[LV]P() which encapsulate FEATURE_EXEC_PREFER_APPLETS
(patch from Gabriel L. Somlo <somlo@cmu.edu>)
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xfuncs.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 601ff3f..3cbb0d3 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -184,17 +184,13 @@ pid_t spawn(char **argv) /* Why static? */ static int failed; pid_t pid; - const char *prog; // Be nice to nommu machines. failed = 0; pid = vfork(); if (pid < 0) return pid; if (!pid) { - prog = argv[0]; - if (ENABLE_FEATURE_EXEC_PREFER_APPLETS && find_applet_by_name(prog)) - prog = CONFIG_BUSYBOX_EXEC_PATH; - execvp(prog, argv); + BB_EXECVP(argv[0], argv); // We're sharing a stack with blocked parent, let parent know we failed // and then exit to unblock parent (but don't run atexit() stuff, which |