]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: be defensive in avoiding gnulib's poll module
authorPádraig Brady <P@draigBrady.com>
Sun, 28 Aug 2022 01:48:11 +0000 (02:48 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 29 Aug 2022 14:33:12 +0000 (15:33 +0100)
* src/tail.c (check_output_alive): Add a guard that would
trigger on most platforms, to detect if we're using the
gnulib poll module.  That's currently problematic in the
way it emulates poll() using select() and would cause
issues on macOS and AIX at least as poll() is replaced there.

src/tail.c

index 3ae6baf5230353e8fc97ae528e4674472903726a..6c7d59faf9060416c7e095db206325ffb650997a 100644 (file)
@@ -352,6 +352,13 @@ check_output_alive (void)
   if (! monitor_output)
     return;
 
+  /* Check we've not enabled gnulib's poll module
+     as that will emulate poll() in a way not
+     currently compatible with tail's usage.  */
+#if defined HAVE_POLL
+# error "gnulib's poll() replacement is currently incompatible"
+#endif
+
   /* poll(2) is needed on AIX (where 'select' gives a readable
      event immediately) and Solaris (where 'select' never gave
      a readable event).  Also use poll(2) on systems we know work