diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-10-28 05:12:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-10-28 05:12:20 +0000 |
commit | 72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71 (patch) | |
tree | 5dbf1995f603a95960c0ef94558954091ce7beef /shell/hush.c | |
parent | 9af363fe20002c7390966d4b71fcdee27b3686ba (diff) | |
download | busybox-w32-72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71.tar.gz busybox-w32-72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71.tar.bz2 busybox-w32-72f9a4277fe5ad7c6c6b9a9810d469cc7fcc3c71.zip |
Add in some (theoretical) uClinux support. Some init cleanups
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index d37842b79..195013869 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1403,7 +1403,12 @@ static int run_pipe_real(struct pipe *pi) | |||
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | /* XXX test for failed fork()? */ | 1405 | /* XXX test for failed fork()? */ |
1406 | if (!(child->pid = fork())) { | 1406 | #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) |
1407 | if (!(child->pid = fork())) | ||
1408 | #else | ||
1409 | if (!(child->pid = vfork())) | ||
1410 | #endif | ||
1411 | { | ||
1407 | /* Set the handling for job control signals back to the default. */ | 1412 | /* Set the handling for job control signals back to the default. */ |
1408 | signal(SIGINT, SIG_DFL); | 1413 | signal(SIGINT, SIG_DFL); |
1409 | signal(SIGQUIT, SIG_DFL); | 1414 | signal(SIGQUIT, SIG_DFL); |
@@ -2118,7 +2123,11 @@ FILE *generate_stream_from_list(struct pipe *head) | |||
2118 | #if 1 | 2123 | #if 1 |
2119 | int pid, channel[2]; | 2124 | int pid, channel[2]; |
2120 | if (pipe(channel)<0) perror_msg_and_die("pipe"); | 2125 | if (pipe(channel)<0) perror_msg_and_die("pipe"); |
2126 | #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) | ||
2121 | pid=fork(); | 2127 | pid=fork(); |
2128 | #else | ||
2129 | pid=vfork(); | ||
2130 | #endif | ||
2122 | if (pid<0) { | 2131 | if (pid<0) { |
2123 | perror_msg_and_die("fork"); | 2132 | perror_msg_and_die("fork"); |
2124 | } else if (pid==0) { | 2133 | } else if (pid==0) { |