aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/hush.c b/shell/hush.c
index e0c562621..2aeb8e440 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -125,14 +125,18 @@
125# define USE_FOR_MMU(...) 125# define USE_FOR_MMU(...)
126#endif 126#endif
127 127
128#if defined SINGLE_APPLET_MAIN 128#define SKIP_definitions 1
129#include "applet_tables.h"
130#undef SKIP_definitions
131#if NUM_APPLETS == 1
129/* STANDALONE does not make sense, and won't compile */ 132/* STANDALONE does not make sense, and won't compile */
130# undef CONFIG_FEATURE_SH_STANDALONE 133# undef CONFIG_FEATURE_SH_STANDALONE
131# undef ENABLE_FEATURE_SH_STANDALONE 134# undef ENABLE_FEATURE_SH_STANDALONE
132# undef IF_FEATURE_SH_STANDALONE 135# undef IF_FEATURE_SH_STANDALONE
136# undef IF_NOT_FEATURE_SH_STANDALONE
137# define ENABLE_FEATURE_SH_STANDALONE 0
133# define IF_FEATURE_SH_STANDALONE(...) 138# define IF_FEATURE_SH_STANDALONE(...)
134# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 139# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
135# define ENABLE_FEATURE_SH_STANDALONE 0
136#endif 140#endif
137 141
138#if !ENABLE_HUSH_INTERACTIVE 142#if !ENABLE_HUSH_INTERACTIVE
@@ -3568,7 +3572,9 @@ static void execvp_or_die(char **argv)
3568{ 3572{
3569 debug_printf_exec("execing '%s'\n", argv[0]); 3573 debug_printf_exec("execing '%s'\n", argv[0]);
3570 sigprocmask(SIG_SETMASK, &G.inherited_set, NULL); 3574 sigprocmask(SIG_SETMASK, &G.inherited_set, NULL);
3571 execvp(argv[0], argv); 3575 /* if FEATURE_SH_STANDALONE, "exec <applet_name>" should work,
3576 * therefore we should use BB_EXECVP, not execvp */
3577 BB_EXECVP(argv[0], argv);
3572 bb_perror_msg("can't execute '%s'", argv[0]); 3578 bb_perror_msg("can't execute '%s'", argv[0]);
3573 _exit(127); /* bash compat */ 3579 _exit(127); /* bash compat */
3574} 3580}