The patch/commit is not proper. The select() call will still be invoked in AIX.
It should be like this.
# diff -u src/tail.c_orig src/tail.c
--- src/tail.c_orig 2019-01-01 19:39:32 +0000
+++ src/tail.c 2019-01-15 17:58:23 +0000
@@ -30,6 +30,9 @@
#include <getopt.h>
#include <sys/types.h>
#include <signal.h>
+#ifdef _AIX
+# include <poll.h>
+#endif
#include "system.h"
#include "argmatch.h"
@@ -338,6 +341,15 @@
if (! monitor_output)
return;
+#ifdef _AIX
+ /* select on AIX was seen to give a readable event immediately. */
+ struct pollfd pfd;
+ pfd.fd = STDOUT_FILENO;
+ pfd.events = POLLERR;
+
+ if (poll (&pfd, 1, 0) >= 0 && (pfd.revents & POLLERR))
+ raise (SIGPIPE);
+#else
struct timeval delay;
delay.tv_sec = delay.tv_usec = 0;
@@ -349,6 +361,7 @@
and implies an error condition on output like broken pipe. */
if (select (STDOUT_FILENO + 1, &rfd, NULL, NULL, &delay) == 1)
raise (SIGPIPE);
+#endif
}
Thanks
Ayappan PBernhard Voelker ---01/15/2019 01:25:14 PM---On 1/13/19 4:31 AM, Pádraig Brady wrote: > Thanks for testing. Pushed at:
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: 33946@debbugs.gnu.org, P@draigBrady.com, ayappap2@in.ibm.com
Date: 01/15/2019 01:25 PM
Subject: bug#33946: tail -f stops abruptly in AIX when piped.
Sent by: "Bug-coreutils" <bug-coreutils-bounces+ayappap2=in.ibm.com@gnu.org>