diff options
| author | Kenichi Handa | 2012-08-28 22:44:20 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-08-28 22:44:20 +0900 |
| commit | 4eb4de01df384be9b8d811f7ab476eeb37ece748 (patch) | |
| tree | d04f0dae31dd8b533a0c3cd738430841ce7ebb84 /src/process.c | |
| parent | fabc1281e9cde34ff9a19d843316d2ceca8647ad (diff) | |
| parent | 4f2daf31078e2cc059710e129dffe0beed8fc7c2 (diff) | |
| download | emacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.tar.gz emacs-4eb4de01df384be9b8d811f7ab476eeb37ece748.zip | |
merge trunk
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/process.c b/src/process.c index 7f6f6bafbea..fbe56ebcb54 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4870,15 +4870,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4870 | for (channel = 0; channel <= max_input_desc; ++channel) | 4870 | for (channel = 0; channel <= max_input_desc; ++channel) |
| 4871 | { | 4871 | { |
| 4872 | struct fd_callback_data *d = &fd_callback_info[channel]; | 4872 | struct fd_callback_data *d = &fd_callback_info[channel]; |
| 4873 | if (FD_ISSET (channel, &Available) | 4873 | if (d->func |
| 4874 | && d->func != 0 | 4874 | && ((d->condition & FOR_READ |
| 4875 | && (d->condition & FOR_READ) != 0) | 4875 | && FD_ISSET (channel, &Available)) |
| 4876 | d->func (channel, d->data, 1); | 4876 | || (d->condition & FOR_WRITE |
| 4877 | if (FD_ISSET (channel, &write_mask) | 4877 | && FD_ISSET (channel, &write_mask)))) |
| 4878 | && d->func != 0 | 4878 | d->func (channel, d->data); |
| 4879 | && (d->condition & FOR_WRITE) != 0) | 4879 | } |
| 4880 | d->func (channel, d->data, 0); | ||
| 4881 | } | ||
| 4882 | 4880 | ||
| 4883 | for (channel = 0; channel <= max_process_desc; channel++) | 4881 | for (channel = 0; channel <= max_process_desc; channel++) |
| 4884 | { | 4882 | { |
| @@ -5198,7 +5196,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5198 | /* There's no good reason to let process filters change the current | 5196 | /* There's no good reason to let process filters change the current |
| 5199 | buffer, and many callers of accept-process-output, sit-for, and | 5197 | buffer, and many callers of accept-process-output, sit-for, and |
| 5200 | friends don't expect current-buffer to be changed from under them. */ | 5198 | friends don't expect current-buffer to be changed from under them. */ |
| 5201 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 5199 | record_unwind_current_buffer (); |
| 5202 | 5200 | ||
| 5203 | /* Read and dispose of the process output. */ | 5201 | /* Read and dispose of the process output. */ |
| 5204 | outstream = p->filter; | 5202 | outstream = p->filter; |
| @@ -6589,7 +6587,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason) | |||
| 6589 | /* There's no good reason to let sentinels change the current | 6587 | /* There's no good reason to let sentinels change the current |
| 6590 | buffer, and many callers of accept-process-output, sit-for, and | 6588 | buffer, and many callers of accept-process-output, sit-for, and |
| 6591 | friends don't expect current-buffer to be changed from under them. */ | 6589 | friends don't expect current-buffer to be changed from under them. */ |
| 6592 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | 6590 | record_unwind_current_buffer (); |
| 6593 | 6591 | ||
| 6594 | sentinel = p->sentinel; | 6592 | sentinel = p->sentinel; |
| 6595 | if (NILP (sentinel)) | 6593 | if (NILP (sentinel)) |