From 5a6aeddfa7262e41802c77f70c9ef88e9c2c2476 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 26 May 2007 16:44:20 +0000 Subject: xpipe: introduce (saves ~170 bytes) udhcp/signalpipe.c: use pipe instead of socketpair. --- shell/hush.c | 6 ++---- shell/lash.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'shell') 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) /* pipes are inserted between pairs of commands */ if ((i + 1) < pi->num_progs) { - if (pipe(pipefds) < 0) - bb_perror_msg_and_die("pipe"); + pipe(pipefds); nextout = pipefds[1]; } else { nextout = 1; @@ -3134,8 +3133,7 @@ static FILE *generate_stream_from_list(struct pipe *head) FILE *pf; int pid, channel[2]; - if (pipe(channel) < 0) - bb_perror_msg_and_die("pipe"); + xpipe(channel); #if BB_MMU pid = fork(); #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]) nextout = 1; if ((i + 1) < newjob->num_progs) { - if (pipe(pipefds) < 0) - bb_perror_msg_and_die("pipe"); + xpipe(pipefds); nextout = pipefds[1]; } else if (outpipe[1] != -1) { nextout = outpipe[1]; -- cgit v1.2.3