aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-07-15 08:18:46 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-07-15 08:18:46 +0200
commit8fa1f5d543266816967949812b65790fbe7cdcd4 (patch)
tree0a721a6d9b53677ec3e0e5c4a8177a428759957d /shell
parent889550b36b057fb8ad5c825c7a17e46fde4ebbf6 (diff)
downloadbusybox-8fa1f5d543266816967949812b65790fbe7cdcd4.tar.gz
hush: fix faloout from previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 8a467be80..7dacfa0b1 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -4328,9 +4328,7 @@ static NOINLINE int run_pipe(struct pipe *pi)
}
#endif
}
-#if ENABLE_FEATURE_SH_STANDALONE
clean_up_and_ret:
-#endif
restore_redirects(squirrel);
unset_vars(new_env);
add_vars(old_vars);
@@ -4342,20 +4340,20 @@ static NOINLINE int run_pipe(struct pipe *pi)
return rcode;
}
-#if ENABLE_FEATURE_SH_STANDALONE
- i = find_applet_by_name(argv_expanded[0]);
- if (i >= 0 && APPLET_IS_NOFORK(i)) {
- rcode = setup_redirects(command, squirrel);
- if (rcode == 0) {
- new_env = expand_assignments(argv, command->assignment_cnt);
- old_vars = set_vars_and_save_old(new_env);
- debug_printf_exec(": run_nofork_applet '%s' '%s'...\n",
- argv_expanded[0], argv_expanded[1]);
- rcode = run_nofork_applet(i, argv_expanded);
+ if (ENABLE_FEATURE_SH_STANDALONE) {
+ int n = find_applet_by_name(argv_expanded[0]);
+ if (n >= 0 && APPLET_IS_NOFORK(n)) {
+ rcode = setup_redirects(command, squirrel);
+ if (rcode == 0) {
+ new_env = expand_assignments(argv, command->assignment_cnt);
+ old_vars = set_vars_and_save_old(new_env);
+ debug_printf_exec(": run_nofork_applet '%s' '%s'...\n",
+ argv_expanded[0], argv_expanded[1]);
+ rcode = run_nofork_applet(n, argv_expanded);
+ }
+ goto clean_up_and_ret;
}
- goto clean_up_and_ret;
}
-#endif
/* It is neither builtin nor applet. We must fork. */
}