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. --- archival/libunarchive/open_transformer.c | 4 +--- archival/tar.c | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'archival') diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c index 456d3e9..58a89b9 100644 --- a/archival/libunarchive/open_transformer.c +++ b/archival/libunarchive/open_transformer.c @@ -17,9 +17,7 @@ int open_transformer(int src_fd, int fd_pipe[2]; int pid; - if (pipe(fd_pipe) != 0) { - bb_perror_msg_and_die("can't create pipe"); - } + xpipe(fd_pipe); pid = fork(); if (pid == -1) { diff --git a/archival/tar.c b/archival/tar.c index 79979b0..e634cc6 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -507,8 +507,8 @@ static int writeTarFile(const int tar_fd, const int verboseFlag, volatile int vfork_exec_errno = 0; const char *zip_exec = (gzip == 1) ? "gzip" : "bzip2"; - if (pipe(gzipDataPipe) < 0 || pipe(gzipStatusPipe) < 0) - bb_perror_msg_and_die("pipe"); + xpipe(gzipDataPipe); + xpipe(gzipStatusPipe); signal(SIGPIPE, SIG_IGN); /* we only want EPIPE on errors */ -- cgit v1.1