diff options
Diffstat (limited to 'src/posix-io.c')
| -rw-r--r-- | src/posix-io.c | 17 | 
1 files changed, 14 insertions, 3 deletions
| diff --git a/src/posix-io.c b/src/posix-io.c index 908c1ee9..ac823fc8 100644 --- a/src/posix-io.c +++ b/src/posix-io.c @@ -340,10 +340,15 @@ int  _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal)  {    int status; +  pid_t ret;    *r_status = 0;    *r_signal = 0; -  if (_gpgme_ath_waitpid (pid, &status, hang? 0 : WNOHANG) == pid) +  do +    ret = _gpgme_ath_waitpid (pid, &status, hang? 0 : WNOHANG); +  while (ret == (pid_t)(-1) && errno == EINTR); + +  if (ret == pid)      {        if (WIFSIGNALED (status))  	{ @@ -697,7 +702,11 @@ _gpgme_io_sendmsg (int fd, const struct msghdr *msg, int flags)  int  _gpgme_io_dup (int fd)  { -  int new_fd = dup (fd); +  int new_fd; + +  do +    new_fd = dup (fd); +  while (new_fd == -1 && errno == EINTR);    TRACE1 (DEBUG_SYSIO, "_gpgme_io_dup", fd, "new fd==%i", new_fd); @@ -727,7 +736,9 @@ _gpgme_io_connect (int fd, struct sockaddr *addr, int addrlen)    TRACE_BEG2 (DEBUG_SYSIO, "_gpgme_io_connect", fd,  	      "addr=%p, addrlen=%i", addr, addrlen); -  res = ath_connect (fd, addr, addrlen); +  do +    res = ath_connect (fd, addr, addrlen); +  while (res == -1 && errno == EINTR);    return TRACE_SYSRES (res);  } | 
