aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-07-01 15:59:42 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-07-01 15:59:42 +0000
commit82604e973085f91f1b99cacea08963d0d1468084 (patch)
tree2de05bb2a6943ca6be0cc46f36e5fb07099aef40 /shell
parentb111917972c1398ef96ef2d388c6c4ba57a8e9f7 (diff)
downloadbusybox-w32-82604e973085f91f1b99cacea08963d0d1468084.tar.gz
busybox-w32-82604e973085f91f1b99cacea08963d0d1468084.tar.bz2
busybox-w32-82604e973085f91f1b99cacea08963d0d1468084.zip
revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 27fab0d1b..72186f970 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1902,7 +1902,7 @@ static int run_pipe(struct pipe *pi)
1902#endif 1902#endif
1903 if (child->pid < 0) { /* [v]fork failed */ 1903 if (child->pid < 0) { /* [v]fork failed */
1904 /* Clearly indicate, was it fork or vfork */ 1904 /* Clearly indicate, was it fork or vfork */
1905 bb_perror_msg(BB_MMU ? "vfork" + 1 : "vfork"); 1905 bb_perror_msg(BB_MMU ? "fork" : "vfork");
1906 } else { 1906 } else {
1907 pi->alive_progs++; 1907 pi->alive_progs++;
1908#if ENABLE_HUSH_JOB 1908#if ENABLE_HUSH_JOB
@@ -3096,7 +3096,9 @@ static FILE *generate_stream_from_list(struct pipe *head)
3096 * huge=`cat TESTFILE` # will block here forever 3096 * huge=`cat TESTFILE` # will block here forever
3097 * echo OK 3097 * echo OK
3098 */ 3098 */
3099 pid = BB_MMU ? xfork() : xvfork(); 3099 pid = BB_MMU ? fork() : vfork();
3100 if (pid < 0)
3101 bb_perror_msg_and_die(BB_MMU ? "fork" : "vfork");
3100 if (pid == 0) { /* child */ 3102 if (pid == 0) { /* child */
3101 if (ENABLE_HUSH_JOB) 3103 if (ENABLE_HUSH_JOB)
3102 die_sleep = 0; /* let nofork's xfuncs die */ 3104 die_sleep = 0; /* let nofork's xfuncs die */