summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--applets/applet_tables.c4
-rw-r--r--include/busybox.h4
-rw-r--r--libbb/vfork_daemon_rexec.c5
-rw-r--r--shell/Config.src4
4 files changed, 11 insertions, 6 deletions
diff --git a/applets/applet_tables.c b/applets/applet_tables.c
index 843f2ec08..8401a1549 100644
--- a/applets/applet_tables.c
+++ b/applets/applet_tables.c
@@ -143,7 +143,9 @@ int main(int argc, char **argv)
printf("};\n");
printf("#endif\n\n");
-#if ENABLE_FEATURE_PREFER_APPLETS
+#if ENABLE_FEATURE_PREFER_APPLETS \
+ || ENABLE_FEATURE_SH_STANDALONE \
+ || ENABLE_FEATURE_SH_NOFORK
printf("const uint8_t applet_flags[] ALIGN1 = {\n");
i = 0;
while (i < NUM_APPLETS) {
diff --git a/include/busybox.h b/include/busybox.h
index 737627bd0..6a003d544 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -19,7 +19,9 @@ extern const uint8_t applet_flags[] ALIGN1;
extern const uint8_t applet_suid[] ALIGN1;
extern const uint8_t applet_install_loc[] ALIGN1;
-#if ENABLE_FEATURE_PREFER_APPLETS
+#if ENABLE_FEATURE_PREFER_APPLETS \
+ || ENABLE_FEATURE_SH_STANDALONE \
+ || ENABLE_FEATURE_SH_NOFORK
# define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4))))
# define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1)))
#else
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index 1adb5b3c4..c192829b5 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -68,7 +68,8 @@ pid_t FAST_FUNC xspawn(char **argv)
return pid;
}
-#if ENABLE_FEATURE_PREFER_APPLETS
+#if ENABLE_FEATURE_PREFER_APPLETS \
+ || ENABLE_FEATURE_SH_NOFORK
static jmp_buf die_jmp;
static void jump(void)
{
@@ -174,7 +175,7 @@ int FAST_FUNC run_nofork_applet(int applet_no, char **argv)
return rc & 0xff; /* don't confuse people with "exitcodes" >255 */
}
-#endif /* FEATURE_PREFER_APPLETS */
+#endif /* FEATURE_PREFER_APPLETS || FEATURE_SH_NOFORK */
int FAST_FUNC spawn_and_wait(char **argv)
{
diff --git a/shell/Config.src b/shell/Config.src
index b31e62dda..e4df35973 100644
--- a/shell/Config.src
+++ b/shell/Config.src
@@ -88,7 +88,7 @@ config FEATURE_SH_EXTRA_QUIET
config FEATURE_SH_STANDALONE
bool "Standalone shell"
default n
- depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
+ depends on (HUSH || ASH)
help
This option causes busybox shells to use busybox applets
in preference to executables in the PATH whenever possible. For
@@ -121,7 +121,7 @@ config FEATURE_SH_STANDALONE
config FEATURE_SH_NOFORK
bool "Run 'nofork' applets directly"
default n
- depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS
+ depends on (HUSH || ASH)
help
This option causes busybox shells to not execute typical
fork/exec/wait sequence, but call <applet>_main directly,