/* Filtering of data through a subprocess.
- Copyright (C) 2001-2003, 2008-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2008-2015 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
for (;;)
{
# if HAVE_SELECT
- int n;
+ int n, retval;
FD_SET (fd[0], &readfds);
n = fd[0] + 1;
n = fd[1] + 1;
}
- n = select (n, &readfds, (!done_writing ? &writefds : NULL), NULL,
- NULL);
+ /* Do EINTR handling here instead of in pipe-filter-aux.h,
+ because select() cannot be referred to from an inline
+ function on AIX 7.1. */
+ do
+ retval = select (n, &readfds, (!done_writing ? &writefds : NULL),
+ NULL, NULL);
+ while (retval < 0 && errno == EINTR);
+ n = retval;
+
if (n < 0)
{
if (exit_on_error)