diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/process.c b/src/process.c index 89a5f3e0386..1544522ff55 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4533,6 +4533,22 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4533 | &Available, | 4533 | &Available, |
| 4534 | (check_write ? &Writeok : (SELECT_TYPE *)0), | 4534 | (check_write ? &Writeok : (SELECT_TYPE *)0), |
| 4535 | (SELECT_TYPE *)0, &timeout); | 4535 | (SELECT_TYPE *)0, &timeout); |
| 4536 | |||
| 4537 | #ifdef HAVE_GNUTLS | ||
| 4538 | /* GnuTLS buffers data internally. In lowat mode it leaves | ||
| 4539 | some data in the TCP buffers so that select works, but | ||
| 4540 | with custom pull/push functions we need to check if some | ||
| 4541 | data is available in the buffers manually. */ | ||
| 4542 | if (nfds == 0 && | ||
| 4543 | wait_proc && wait_proc->gnutls_p /* Check for valid process. */ | ||
| 4544 | /* Do we have pending data? */ | ||
| 4545 | && gnutls_record_check_pending (wait_proc->gnutls_state) > 0) | ||
| 4546 | { | ||
| 4547 | nfds = 1; | ||
| 4548 | /* Set to Available. */ | ||
| 4549 | FD_SET (wait_proc->infd, &Available); | ||
| 4550 | } | ||
| 4551 | #endif | ||
| 4536 | } | 4552 | } |
| 4537 | 4553 | ||
| 4538 | xerrno = errno; | 4554 | xerrno = errno; |