From 85f54d8e836ac80264111df7d87db6c15eaca558 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 8 Feb 2016 15:24:33 -0600 Subject: Add xpipe() to lib. --- toys/pending/syslogd.c | 2 +- toys/pending/tar.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'toys/pending') diff --git a/toys/pending/syslogd.c b/toys/pending/syslogd.c index 450bd72f..73542cac 100644 --- a/toys/pending/syslogd.c +++ b/toys/pending/syslogd.c @@ -460,7 +460,7 @@ init_jumpin: } // Setup signals - if (pipe(TT.sigfd) < 0) error_exit("pipe failed\n"); + xpipe(TT.sigfd); fcntl(TT.sigfd[1] , F_SETFD, FD_CLOEXEC); fcntl(TT.sigfd[0] , F_SETFD, FD_CLOEXEC); diff --git a/toys/pending/tar.c b/toys/pending/tar.c index c8b6dff8..6140ea5d 100644 --- a/toys/pending/tar.c +++ b/toys/pending/tar.c @@ -287,7 +287,7 @@ static void compress_stream(struct archive_handler *tar_hdl) int pipefd[2]; pid_t cpid; - if (pipe(pipefd) == -1) error_exit("pipe"); + xpipe(pipefd); signal(SIGPIPE, SIG_IGN); cpid = fork(); -- cgit v1.2.3