diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2011-04-25 23:17:52 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-04-25 23:17:52 -0700 |
| commit | 671875dac181f7f1337f21d013a9c3d5f235ddf2 (patch) | |
| tree | 4091c2537439713df8efe8d3376116a6db3eb1c5 /src/process.c | |
| parent | f904488ff40dcee3e340b63a6386dde124d1241c (diff) | |
| parent | 0c6b7b19e52ba18b5d4fd2d4b73b133a0a721603 (diff) | |
| download | emacs-671875dac181f7f1337f21d013a9c3d5f235ddf2.tar.gz | |
Merge from mainline.
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, &Available, (check_write ? &Writeok : (SELECT_TYPE *)0), (SELECT_TYPE *)0, &timeout); + +#ifdef HAVE_GNUTLS + /* GnuTLS buffers data internally. In lowat mode it leaves + some data in the TCP buffers so that select works, but + with custom pull/push functions we need to check if some + data is available in the buffers manually. */ + if (nfds == 0 && + wait_proc && wait_proc->gnutls_p /* Check for valid process. */ + /* Do we have pending data? */ + && gnutls_record_check_pending (wait_proc->gnutls_state) > 0) + { + nfds = 1; + /* Set to Available. */ + FD_SET (wait_proc->infd, &Available); + } +#endif } xerrno = errno; |
