Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-16 01:58:14 +0400
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-16 01:58:14 +0400
commit41ddecd9ed27239e478e65886fec3f0fd23f8cdb (patch)
treeb3dbcbbaf2911971b25937734160ab60905b6b2b /shell
parentc376db332cfcab6b25b381729bd658b703a2f36a (diff)
hush: fix heredoc_huge.tests broken in last commits
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index b91e8c34d..1753be0d1 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2461,11 +2461,15 @@ static void setup_heredoc(struct redir_struct *redir)
* for the unsuspecting parent process. Child creates a grandchild
* and exits before parent execs the process which consumes heredoc
* (that exec happens after we return from this function) */
+#if !BB_MMU
+ to_free = NULL;
+#endif
pid = vfork();
if (pid < 0)
bb_perror_msg_and_die("vfork");
if (pid == 0) {
/* child */
+ disable_restore_tty_pgrp_on_exit();
pid = BB_MMU ? fork() : vfork();
if (pid < 0)
bb_perror_msg_and_die(BB_MMU ? "fork" : "vfork");
@@ -2478,7 +2482,6 @@ static void setup_heredoc(struct redir_struct *redir)
_exit(0);
#else
/* Delegate blocking writes to another process */
- disable_restore_tty_pgrp_on_exit();
xmove_fd(pair.wr, STDOUT_FILENO);
re_execute_shell(&to_free, heredoc, NULL, NULL);
#endif