diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2015-04-20 19:59:18 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2015-04-20 19:59:18 +0300 |
commit | db190a832c49ca3aed6d69cc992fa5583cae7b11 (patch) | |
tree | e5a5cd8469d4089fa5221f809ff5b73a285b4dd7 /src/xz | |
parent | Update THANKS. (diff) | |
download | xz-db190a832c49ca3aed6d69cc992fa5583cae7b11.tar.xz |
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.
Diffstat (limited to 'src/xz')
-rw-r--r-- | src/xz/file_io.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/xz/file_io.c b/src/xz/file_io.c index 20f512a2..9bd515dd 100644 --- a/src/xz/file_io.c +++ b/src/xz/file_io.c @@ -82,13 +82,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)); @@ -101,7 +95,6 @@ io_init(void) message_fatal(_("Error creating a pipe: %s"), strerror(errno)); } -# endif #endif #ifdef __DJGPP__ |