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
a0bee46f
Commit
a0bee46f
authored
Jul 09, 2012
by
Paul Eggert
Browse files
* process.c (wait_reading_process_output): 'waitchannels' was unset
when read_kbd || !NILP (wait_for_cell); fix this.
parent
e00c793a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
src/ChangeLog
src/ChangeLog
+3
-0
src/process.c
src/process.c
+11
-15
No files found.
src/ChangeLog
View file @
a0bee46f
2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
* process.c (wait_reading_process_output): 'waitchannels' was unset
when read_kbd || !NILP (wait_for_cell); fix this.
Add GCC-style 'const' attribute to functions that can use it.
* character.h (char_resolve_modifier_mask):
* keyboard.h (make_ctrl_char):
...
...
src/process.c
View file @
a0bee46f
...
...
@@ -4239,7 +4239,7 @@ wait_reading_process_output_1 (void)
If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
READ_KBD is
a lisp value
:
READ_KBD is:
0 to ignore keyboard input, or
1 to return when input is available, or
-1 meaning caller will actually read the input, so don't throw to
...
...
@@ -6820,7 +6820,7 @@ extern int sys_select (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *,
If NSECS > 0, the timeout consists of NSECS only.
If NSECS < 0, gobble data immediately, as if TIME_LIMIT were negative.
READ_KBD is
a Lisp_Object
:
READ_KBD is:
0 to ignore keyboard input, or
1 to return when input is available, or
-1 means caller will actually read the input, so don't throw to
...
...
@@ -6842,8 +6842,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
{
register int nfds;
EMACS_TIME end_time, timeout;
SELECT_TYPE waitchannels;
int xerrno;
if (time_limit < 0)
{
...
...
@@ -6870,6 +6868,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
while (1)
{
int timeout_reduced_for_timers = 0;
SELECT_TYPE waitchannels;
int xerrno;
/* If calling from keyboard input, do not quit
since we want to return C-g as an input character.
...
...
@@ -6944,13 +6944,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
if (read_kbd < 0)
set_waiting_for_input (&timeout);
/* Wait till there is something to do. */
if (! read_kbd && NILP (wait_for_cell))
FD_ZERO (&waitchannels);
else
FD_SET (0, &waitchannels);
/* If a frame has been newly mapped and needs updating,
reprocess its display stuff. */
if (frame_garbaged && do_display)
...
...
@@ -6961,13 +6954,16 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
set_waiting_for_input (&timeout);
}
/* Wait till there is something to do. */
FD_ZERO (&waitchannels);
if (read_kbd && detect_input_pending ())
nfds = 0;
else
{
nfds = 0;
FD_ZERO (&waitchannels);
if (read_kbd || !NILP (wait_for_cell))
FD_SET (0, &waitchannels);
nfds = pselect (1, &waitchannels, NULL, NULL, &timeout, NULL);
}
else
nfds = pselect (1, &waitchannels, NULL, NULL, &timeout, NULL);
xerrno = errno;
...
...
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