From 6bd0349c58451b13442e8f463e35de83548bf985 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Mon, 20 Apr 2015 19:59:18 +0300 Subject: Revert "xz: Use pipe2() if available." This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd. It is a problem when libc has pipe2() but the kernel is too old to have pipe2() and thus pipe2() fails. In xz it's pointless to have a fallback for non-functioning pipe2(); it's better to avoid pipe2() completely. Thanks to Michael Fox for the bug report. --- src/xz/file_io.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/xz/file_io.c') diff --git a/src/xz/file_io.c b/src/xz/file_io.c index 8a5e0453..e5a29925 100644 --- a/src/xz/file_io.c +++ b/src/xz/file_io.c @@ -95,13 +95,7 @@ io_init(void) // we are root. warn_fchown = geteuid() == 0; - // Create a pipe for the self-pipe trick. If pipe2() is available, - // we can avoid the fcntl() calls. -# ifdef HAVE_PIPE2 - if (pipe2(user_abort_pipe, O_NONBLOCK)) - message_fatal(_("Error creating a pipe: %s"), - strerror(errno)); -# else + // Create a pipe for the self-pipe trick. if (pipe(user_abort_pipe)) message_fatal(_("Error creating a pipe: %s"), strerror(errno)); @@ -114,7 +108,6 @@ io_init(void) message_fatal(_("Error creating a pipe: %s"), strerror(errno)); } -# endif #endif #ifdef __DJGPP__ -- cgit v1.2.3