diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/process.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/process.c b/src/process.c index d52f52bcdfd..2c3ad252a68 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1747,15 +1747,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1747 | EMACS_SET_SECS_USECS (timeout, 100000, 0); | 1747 | EMACS_SET_SECS_USECS (timeout, 100000, 0); |
| 1748 | } | 1748 | } |
| 1749 | 1749 | ||
| 1750 | /* Cause C-g and alarm signals to take immediate action, | ||
| 1751 | and cause input available signals to zero out timeout. | ||
| 1752 | |||
| 1753 | It is important that we do this before checking for process | ||
| 1754 | activity. If we get a SIGCHLD after the explicit checks for | ||
| 1755 | process activity, timeout is the only way we will know. */ | ||
| 1756 | if (XINT (read_kbd) < 0) | ||
| 1757 | set_waiting_for_input (&timeout); | ||
| 1758 | |||
| 1759 | /* If status of something has changed, and no input is | 1750 | /* If status of something has changed, and no input is |
| 1760 | available, notify the user of the change right away. After | 1751 | available, notify the user of the change right away. After |
| 1761 | this explicit check, we'll let the SIGCHLD handler zap | 1752 | this explicit check, we'll let the SIGCHLD handler zap |
| @@ -1768,6 +1759,15 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1768 | status_notify (); | 1759 | status_notify (); |
| 1769 | } | 1760 | } |
| 1770 | 1761 | ||
| 1762 | /* Cause C-g and alarm signals to take immediate action, | ||
| 1763 | and cause input available signals to zero out timeout. | ||
| 1764 | |||
| 1765 | It is important that we do this before checking for process | ||
| 1766 | activity. If we get a SIGCHLD after the explicit checks for | ||
| 1767 | process activity, timeout is the only way we will know. */ | ||
| 1768 | if (XINT (read_kbd) < 0) | ||
| 1769 | set_waiting_for_input (&timeout); | ||
| 1770 | |||
| 1771 | /* Don't wait for output from a non-running process. */ | 1771 | /* Don't wait for output from a non-running process. */ |
| 1772 | if (wait_proc != 0 && !NILP (wait_proc->raw_status_low)) | 1772 | if (wait_proc != 0 && !NILP (wait_proc->raw_status_low)) |
| 1773 | update_status (wait_proc); | 1773 | update_status (wait_proc); |