svn commit: [26118] trunk/busybox/shell

vda at busybox.net vda at busybox.net
Wed Apr 15 21:58:14 UTC 2009


Author: vda
Date: 2009-04-15 21:58:14 +0000 (Wed, 15 Apr 2009)
New Revision: 26118

Log:
hush: fix heredoc_huge.tests broken in last commits



Modified:
   trunk/busybox/shell/hush.c


Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c	2009-04-15 21:49:48 UTC (rev 26117)
+++ trunk/busybox/shell/hush.c	2009-04-15 21:58:14 UTC (rev 26118)
@@ -2461,11 +2461,15 @@
 	 * 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 @@
 		_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



More information about the busybox-cvs mailing list