summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko2007-02-06 01:20:12 +0000
committerDenis Vlasenko2007-02-06 01:20:12 +0000
commit1d76f439da81d3a05f0e0fdde3f81ec56fb20836 (patch)
treef3e2e2185d092f87843fe4bbc9d1098185a5bdbd /libbb
parentcc24419e98853aede7c652edb3c1c79a9865bdda (diff)
downloadbusybox-1d76f439da81d3a05f0e0fdde3f81ec56fb20836.zip
busybox-1d76f439da81d3a05f0e0fdde3f81ec56fb20836.tar.gz
EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/execable.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/execable.c b/libbb/execable.c
index 817c067..601c753 100644
--- a/libbb/execable.c
+++ b/libbb/execable.c
@@ -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