diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-02 03:28:56 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-02 03:28:56 +0100 |
commit | c71b469f5daceb717e31cc9ce46b0e058e2c57b6 (patch) | |
tree | ab428529615091f3d1759ad9fcd254f0cab46b19 /libbb/execable.c | |
parent | 099e528919e2219772265e99ab8a43d188c1b8db (diff) | |
download | busybox-w32-c71b469f5daceb717e31cc9ce46b0e058e2c57b6.tar.gz busybox-w32-c71b469f5daceb717e31cc9ce46b0e058e2c57b6.tar.bz2 busybox-w32-c71b469f5daceb717e31cc9ce46b0e058e2c57b6.zip |
libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exe
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/execable.c')
-rw-r--r-- | libbb/execable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/execable.c b/libbb/execable.c index d37640007..178a00a5f 100644 --- a/libbb/execable.c +++ b/libbb/execable.c | |||
@@ -68,12 +68,12 @@ int FAST_FUNC exists_execable(const char *filename) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | #if ENABLE_FEATURE_PREFER_APPLETS | 70 | #if ENABLE_FEATURE_PREFER_APPLETS |
71 | /* just like the real execvp, but try to launch an applet named 'file' first | 71 | /* just like the real execvp, but try to launch an applet named 'file' first */ |
72 | */ | 72 | int FAST_FUNC BB_EXECVP(const char *file, char *const argv[]) |
73 | int FAST_FUNC bb_execvp(const char *file, char *const argv[]) | ||
74 | { | 73 | { |
75 | return execvp(find_applet_by_name(file) >= 0 ? bb_busybox_exec_path : file, | 74 | if (find_applet_by_name(file) >= 0) |
76 | argv); | 75 | execvp(bb_busybox_exec_path, argv); |
76 | return execvp(file, argv); | ||
77 | } | 77 | } |
78 | #endif | 78 | #endif |
79 | 79 | ||