aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-26 16:44:20 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-26 16:44:20 +0000
commit5a6aeddfa7262e41802c77f70c9ef88e9c2c2476 (patch)
tree36bf70fe7e6c67e4ab37c446a191272eb90097ed /shell
parent6239b1f50a04121d96daba2cdc2f7c3765c9007b (diff)
downloadbusybox-w32-5a6aeddfa7262e41802c77f70c9ef88e9c2c2476.tar.gz
busybox-w32-5a6aeddfa7262e41802c77f70c9ef88e9c2c2476.tar.bz2
busybox-w32-5a6aeddfa7262e41802c77f70c9ef88e9c2c2476.zip
xpipe: introduce (saves ~170 bytes)
udhcp/signalpipe.c: use pipe instead of socketpair.
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c6
-rw-r--r--shell/lash.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 800b0f970..2e6f286dc 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1800,8 +1800,7 @@ static int run_pipe_real(struct pipe *pi)
1800 1800
1801 /* pipes are inserted between pairs of commands */ 1801 /* pipes are inserted between pairs of commands */
1802 if ((i + 1) < pi->num_progs) { 1802 if ((i + 1) < pi->num_progs) {
1803 if (pipe(pipefds) < 0) 1803 pipe(pipefds);
1804 bb_perror_msg_and_die("pipe");
1805 nextout = pipefds[1]; 1804 nextout = pipefds[1];
1806 } else { 1805 } else {
1807 nextout = 1; 1806 nextout = 1;
@@ -3134,8 +3133,7 @@ static FILE *generate_stream_from_list(struct pipe *head)
3134 FILE *pf; 3133 FILE *pf;
3135 int pid, channel[2]; 3134 int pid, channel[2];
3136 3135
3137 if (pipe(channel) < 0) 3136 xpipe(channel);
3138 bb_perror_msg_and_die("pipe");
3139#if BB_MMU 3137#if BB_MMU
3140 pid = fork(); 3138 pid = fork();
3141#else 3139#else
diff --git a/shell/lash.c b/shell/lash.c
index 24e48c337..28449b791 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1222,8 +1222,7 @@ static int run_command(struct job *newjob, int inbg, int outpipe[2])
1222 1222
1223 nextout = 1; 1223 nextout = 1;
1224 if ((i + 1) < newjob->num_progs) { 1224 if ((i + 1) < newjob->num_progs) {
1225 if (pipe(pipefds) < 0) 1225 xpipe(pipefds);
1226 bb_perror_msg_and_die("pipe");
1227 nextout = pipefds[1]; 1226 nextout = pipefds[1];
1228 } else if (outpipe[1] != -1) { 1227 } else if (outpipe[1] != -1) {
1229 nextout = outpipe[1]; 1228 nextout = outpipe[1];