From 17983b2cb3bccbb4fa69691178caddd99269bda9 Mon Sep 17 00:00:00 2001 From: Ayappan Date: Sun, 20 Jan 2019 00:17:33 -0800 Subject: [PATCH] tail: fix recent ineffective AIX change * src/tail.c: Fix commit v8.30-40-gd5ab4cb which was ineffective. Fixes http://bugs.gnu.org/33946 --- src/tail.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tail.c b/src/tail.c index 9f5f44315a..c63b616317 100644 --- a/src/tail.c +++ b/src/tail.c @@ -339,6 +339,9 @@ named file in a way that accommodates renaming, removal and creation.\n\ static void check_output_alive (void) { + if (! monitor_output) + return; + #ifdef _AIX /* select on AIX was seen to give a readable event immediately. */ struct pollfd pfd; @@ -347,11 +350,7 @@ check_output_alive (void) if (poll (&pfd, 1, 0) >= 0 && (pfd.revents & POLLERR)) raise (SIGPIPE); -#endif - - if (! monitor_output) - return; - +#else struct timeval delay; delay.tv_sec = delay.tv_usec = 0; @@ -363,6 +362,7 @@ check_output_alive (void) and implies an error condition on output like broken pipe. */ if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) == 1) raise (SIGPIPE); +#endif } static bool -- 2.47.3