diff options
| author | Joakim Verona | 2011-11-22 15:46:22 +0100 |
|---|---|---|
| committer | Joakim Verona | 2011-11-22 15:46:22 +0100 |
| commit | a9c1e05adddf6011c61c0df582c5f2ed423f35c8 (patch) | |
| tree | 489fac119296416ba2f3530fd3bcb70efbbbdaa6 /src/process.c | |
| parent | 40bb789236e486a3f36eefb2840c293369ce2af3 (diff) | |
| parent | b5afc20930c91159a1cbf629bcaa7e251653dc74 (diff) | |
| download | emacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.tar.gz emacs-a9c1e05adddf6011c61c0df582c5f2ed423f35c8.zip | |
upstream
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c index 53382d804f2..a02ba44ae71 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1414,7 +1414,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1414 | val = XCDR (Vdefault_process_coding_system); | 1414 | val = XCDR (Vdefault_process_coding_system); |
| 1415 | } | 1415 | } |
| 1416 | XPROCESS (proc)->encode_coding_system = val; | 1416 | XPROCESS (proc)->encode_coding_system = val; |
| 1417 | /* Note: At this momemnt, the above coding system may leave | 1417 | /* Note: At this moment, the above coding system may leave |
| 1418 | text-conversion or eol-conversion unspecified. They will be | 1418 | text-conversion or eol-conversion unspecified. They will be |
| 1419 | decided after we read output from the process and decode it by | 1419 | decided after we read output from the process and decode it by |
| 1420 | some coding system, or just before we actually send a text to | 1420 | some coding system, or just before we actually send a text to |
| @@ -4620,15 +4620,43 @@ 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 | This is a workaround needed for some versions of |
| 4630 | FD_SET (wait_proc->infd, &Available); | 4630 | the gnutls library -- 2.12.14 has been confirmed |
| 4631 | } | 4631 | to need it. See |
| 4632 | http://comments.gmane.org/gmane.emacs.devel/145074 */ | ||
| 4633 | struct Lisp_Process *proc; | ||
| 4634 | for (channel = 0; channel < MAXDESC; ++channel) | ||
| 4635 | { | ||
| 4636 | if (! NILP (chan_process[channel]) && | ||
| 4637 | (proc = XPROCESS (chan_process[channel])) != NULL && | ||
| 4638 | proc->gnutls_p && | ||
| 4639 | proc->infd && | ||
| 4640 | emacs_gnutls_record_check_pending (proc->gnutls_state) > 0) | ||
| 4641 | { | ||
| 4642 | nfds++; | ||
| 4643 | FD_SET (proc->infd, &Available); | ||
| 4644 | } | ||
| 4645 | } | ||
| 4646 | } | ||
| 4647 | else | ||
| 4648 | { | ||
| 4649 | /* Check this specific channel. */ | ||
| 4650 | if (wait_proc->gnutls_p && /* Check for valid process. */ | ||
| 4651 | /* Do we have pending data? */ | ||
| 4652 | emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) | ||
| 4653 | { | ||
| 4654 | nfds = 1; | ||
| 4655 | /* Set to Available. */ | ||
| 4656 | FD_SET (wait_proc->infd, &Available); | ||
| 4657 | } | ||
| 4658 | } | ||
| 4659 | } | ||
| 4632 | #endif | 4660 | #endif |
| 4633 | } | 4661 | } |
| 4634 | 4662 | ||