static const unsigned int IF_FALSE_CONTEXT=0x4;
static const unsigned int THEN_EXP_CONTEXT=0x8;
static const unsigned int ELSE_EXP_CONTEXT=0x10;
-unsigned int shell_context = 0;
+unsigned int shell_context;
};
static char *cwd;
-static char *local_pending_command = NULL;
+static char *local_pending_command;
static struct jobset job_list = { NULL, NULL };
static int argc;
static char **argv;
argc = argc_l;
argv = argv_l;
+ shell_context = 0;
+ cwd=NULL;
+#ifdef BB_FEATURE_STANDALONE_SHELL
+ /* These variables need re-initializing when recursing */
+ local_pending_command = NULL;
+ job_list.head = NULL;
+ job_list.fg = NULL;
+#ifdef BB_FEATURE_SH_ENVIRONMENT
+ last_bg_pid=-1;
+ last_return_code=-1;
+ show_x_trace=FALSE;
+#endif
+#endif
if (argv[0] && argv[0][0] == '-') {
FILE *input;
static const unsigned int IF_FALSE_CONTEXT=0x4;
static const unsigned int THEN_EXP_CONTEXT=0x8;
static const unsigned int ELSE_EXP_CONTEXT=0x10;
-unsigned int shell_context = 0;
+unsigned int shell_context;
};
static char *cwd;
-static char *local_pending_command = NULL;
+static char *local_pending_command;
static struct jobset job_list = { NULL, NULL };
static int argc;
static char **argv;
argc = argc_l;
argv = argv_l;
+ shell_context = 0;
+ cwd=NULL;
+#ifdef BB_FEATURE_STANDALONE_SHELL
+ /* These variables need re-initializing when recursing */
+ local_pending_command = NULL;
+ job_list.head = NULL;
+ job_list.fg = NULL;
+#ifdef BB_FEATURE_SH_ENVIRONMENT
+ last_bg_pid=-1;
+ last_return_code=-1;
+ show_x_trace=FALSE;
+#endif
+#endif
if (argv[0] && argv[0][0] == '-') {
FILE *input;
static const unsigned int IF_FALSE_CONTEXT=0x4;
static const unsigned int THEN_EXP_CONTEXT=0x8;
static const unsigned int ELSE_EXP_CONTEXT=0x10;
-unsigned int shell_context = 0;
+unsigned int shell_context;
};
static char *cwd;
-static char *local_pending_command = NULL;
+static char *local_pending_command;
static struct jobset job_list = { NULL, NULL };
static int argc;
static char **argv;
argc = argc_l;
argv = argv_l;
+ shell_context = 0;
+ cwd=NULL;
+#ifdef BB_FEATURE_STANDALONE_SHELL
+ /* These variables need re-initializing when recursing */
+ local_pending_command = NULL;
+ job_list.head = NULL;
+ job_list.fg = NULL;
+#ifdef BB_FEATURE_SH_ENVIRONMENT
+ last_bg_pid=-1;
+ last_return_code=-1;
+ show_x_trace=FALSE;
+#endif
+#endif
if (argv[0] && argv[0][0] == '-') {
FILE *input;