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

@@ -59,3 +59,13 @@ int exists_execable(const char *filename)
}
return 0;
}
#ifdef ENABLE_FEATURE_EXEC_PREFER_APPLETS
/* just like the real execvp, but try to launch an applet named 'file' first
*/
int bb_execvp(const char *file, char *const argv[])
{
return execvp(find_applet_by_name(file) ? CONFIG_BUSYBOX_EXEC_PATH : file,
argv);
}
#endif