summaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorEric Andersen2001-10-28 05:12:20 +0000
committerEric Andersen2001-10-28 05:12:20 +0000
commit72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71 (patch)
tree5dbf1995f603a95960c0ef94558954091ce7beef /shell/hush.c
parent9af363fe20002c7390966d4b71fcdee27b3686ba (diff)
downloadbusybox-72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71.zip
busybox-72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71.tar.gz
Add in some (theoretical) uClinux support. Some init cleanups
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index d37842b..1950138 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1403,7 +1403,12 @@ static int run_pipe_real(struct pipe *pi)
}
/* XXX test for failed fork()? */
- if (!(child->pid = fork())) {
+#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
+ if (!(child->pid = fork()))
+#else
+ if (!(child->pid = vfork()))
+#endif
+ {
/* Set the handling for job control signals back to the default. */
signal(SIGINT, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
@@ -2118,7 +2123,11 @@ FILE *generate_stream_from_list(struct pipe *head)
#if 1
int pid, channel[2];
if (pipe(channel)<0) perror_msg_and_die("pipe");
+#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
pid=fork();
+#else
+ pid=vfork();
+#endif
if (pid<0) {
perror_msg_and_die("fork");
} else if (pid==0) {