aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/src/process.c b/src/process.c
index bea9e72019b..02eb1122a07 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4620,15 +4620,39 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
4620 some data in the TCP buffers so that select works, but 4620 some data in the TCP buffers so that select works, but
4621 with custom pull/push functions we need to check if some 4621 with custom pull/push functions we need to check if some
4622 data is available in the buffers manually. */ 4622 data is available in the buffers manually. */
4623 if (nfds == 0 && 4623 if (nfds == 0)
4624 wait_proc && wait_proc->gnutls_p /* Check for valid process. */ 4624 {
4625 /* Do we have pending data? */ 4625 if (! wait_proc)
4626 && emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) 4626 {
4627 { 4627 /* We're not waiting on a specific process, so loop
4628 nfds = 1; 4628 through all the channels and check for data. */
4629 /* Set to Available. */ 4629 struct Lisp_Process *proc;
4630 FD_SET (wait_proc->infd, &Available); 4630 for (channel = 0; channel < MAXDESC; ++channel)
4631 } 4631 {
4632 if (! NILP (chan_process[channel]) &&
4633 (proc = XPROCESS (chan_process[channel])) != NULL &&
4634 proc->gnutls_p &&
4635 proc->infd &&
4636 emacs_gnutls_record_check_pending (proc->gnutls_state) > 0)
4637 {
4638 nfds++;
4639 FD_SET (proc->infd, &Available);
4640 }
4641 }
4642 }
4643 else
4644 {
4645 /* Check this specific channel. */
4646 if (wait_proc->gnutls_p && /* Check for valid process. */
4647 /* Do we have pending data? */
4648 emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0)
4649 {
4650 nfds = 1;
4651 /* Set to Available. */
4652 FD_SET (wait_proc->infd, &Available);
4653 }
4654 }
4655 }
4632#endif 4656#endif
4633 } 4657 }
4634 4658