aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorK. Handa2015-09-08 20:43:11 +0900
committerK. Handa2015-09-08 20:43:11 +0900
commit94ed5167557112fb00eeca05e62589db744206de (patch)
tree80a544f8534802dd61fbd218b97441d3419dbf6b /src/process.c
parent33f2e0023a5ef03db3e99ade0b93a7a1a913dbe1 (diff)
parent10e7f7de910ca816799062f33b830f7598801f0e (diff)
downloademacs-94ed5167557112fb00eeca05e62589db744206de.tar.gz
emacs-94ed5167557112fb00eeca05e62589db744206de.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/process.c b/src/process.c
index 1ab83780914..f4613be28ed 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4859,6 +4859,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4859 data is available in the buffers manually. */ 4859 data is available in the buffers manually. */
4860 if (nfds == 0) 4860 if (nfds == 0)
4861 { 4861 {
4862 fd_set tls_available;
4863 int set = 0;
4864
4865 FD_ZERO (&tls_available);
4862 if (! wait_proc) 4866 if (! wait_proc)
4863 { 4867 {
4864 /* We're not waiting on a specific process, so loop 4868 /* We're not waiting on a specific process, so loop
@@ -4879,7 +4883,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4879 { 4883 {
4880 nfds++; 4884 nfds++;
4881 eassert (p->infd == channel); 4885 eassert (p->infd == channel);
4882 FD_SET (p->infd, &Available); 4886 FD_SET (p->infd, &tls_available);
4887 set++;
4883 } 4888 }
4884 } 4889 }
4885 } 4890 }
@@ -4896,9 +4901,12 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4896 nfds = 1; 4901 nfds = 1;
4897 eassert (0 <= wait_proc->infd); 4902 eassert (0 <= wait_proc->infd);
4898 /* Set to Available. */ 4903 /* Set to Available. */
4899 FD_SET (wait_proc->infd, &Available); 4904 FD_SET (wait_proc->infd, &tls_available);
4905 set++;
4900 } 4906 }
4901 } 4907 }
4908 if (set)
4909 Available = tls_available;
4902 } 4910 }
4903#endif 4911#endif
4904 } 4912 }