]> Savannah Git Hosting - gnulib.git/commitdiff
pipe-filter-gi: Fix test failure on AIX 7.2.
authorBruno Haible <bruno@clisp.org>
Wed, 6 Jan 2021 06:23:14 +0000 (07:23 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 6 Jan 2021 06:23:14 +0000 (07:23 +0100)
* lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.

ChangeLog
lib/pipe-filter-aux.h

index 61d4e7aaef609d620d1b6c946d4bc66ed6bf8dd8..5419da4d19065578f2fb861d0757f52996faa46b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-05  Bruno Haible  <bruno@clisp.org>
+
+       pipe-filter-gi: Fix test failure on AIX 7.2.
+       * lib/pipe-filter-aux.h (SSIZE_MAX) [AIX]: Set to 4096.
+
 2021-01-05  Bruno Haible  <bruno@clisp.org>
 
        utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.
index 294a27ece532a862ea94d8d5c4d2fda4ff2f4da8..2977260ecec2972f0458a0a05c72f0ff57dc8b3d 100644 (file)
@@ -26,6 +26,15 @@ _GL_INLINE_HEADER_BEGIN
 #ifndef SSIZE_MAX
 # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
 #endif
+#ifdef _AIX
+/* On AIX, despite having select() and despite having put the file descriptor
+   in non-blocking mode, it can happen that select() reports that fd[1] is
+   writable but writing a large amount of data to fd[1] then fails with errno
+   EAGAIN.  Seen with test-pipe-filter-gi1 on AIX 7.2, with data sizes of
+   29 KB.  So, limit the size of data passed to the write() call to 4 KB.  */
+# undef SSIZE_MAX
+# define SSIZE_MAX 4096
+#endif
 
 /* We use a child process, and communicate through a bidirectional pipe.
    To avoid deadlocks, let the child process decide when it wants to read