Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
85fabcb7
Commit
85fabcb7
authored
Nov 04, 2012
by
Chong Yidong
Browse files
* process.c (wait_reading_process_output): Clean up last change.
parent
893cc455
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
src/ChangeLog
src/ChangeLog
+5
-0
src/process.c
src/process.c
+6
-11
No files found.
src/ChangeLog
View file @
85fabcb7
2012-11-03 Chong Yidong <cyd@gnu.org>
* process.c (wait_reading_process_output): Clean up the last
change.
2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
* process.c (wait_reading_process_output): Avoid a race condition
...
...
src/process.c
View file @
85fabcb7
...
...
@@ -4354,8 +4354,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
while (1)
{
int timeout_reduced_for_timers = 0;
/* If calling from keyboard input, do not quit
since we want to return C-g as an input character.
Otherwise, do pending quit if requested. */
...
...
@@ -4435,10 +4433,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (EMACS_TIME_VALID_P (timer_delay))
{
if (EMACS_TIME_LT (timer_delay, timeout))
{
timeout = timer_delay;
timeout_reduced_for_timers = 1;
}
timeout = timer_delay;
}
else
{
...
...
@@ -4697,11 +4692,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
/* If we woke up due to SIGWINCH, actually change size now. */
do_pending_window_change (0);
/*
The following optimization fails if SIGIO is received between
set_waiting_for_input and select (Bug#11536).
if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers)
break;
*/
/*
We used to break here if nfds == 0, i.e. we seemed to have
waited the full period. But apparently if Emacs receives
SIGIO between set_waiting_for_input and select, select can
return with nfds == 0 due to the timeout being zeroed out by
the signal handler (Bug#11536).
*/
if (nfds < 0)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment