diff options
| author | Richard M. Stallman | 1997-06-22 09:06:04 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-22 09:06:04 +0000 |
| commit | 5d5beb624a0c929d924341dc0d0cc0cad915aeda (patch) | |
| tree | 62ca39ae492d2b0e76ad3c04a8448aec4dc41e31 /src/process.c | |
| parent | fa526c4a22cd87b680928c082cf3e74d87f0da55 (diff) | |
| download | emacs-5d5beb624a0c929d924341dc0d0cc0cad915aeda.tar.gz emacs-5d5beb624a0c929d924341dc0d0cc0cad915aeda.zip | |
(wait_reading_process_input): Don't check for
keyboard input if wait_for_cell.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/process.c b/src/process.c index 357974588d9..c51d862969b 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2413,6 +2413,21 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2413 | kill (getpid (), SIGIO); | 2413 | kill (getpid (), SIGIO); |
| 2414 | #endif | 2414 | #endif |
| 2415 | 2415 | ||
| 2416 | #if 0 /* When polling is used, interrupt_input is 0, | ||
| 2417 | so get_input_pending should read the input. | ||
| 2418 | So this should not be needed. */ | ||
| 2419 | /* If we are using polling for input, | ||
| 2420 | and we see input available, make it get read now. | ||
| 2421 | Otherwise it might not actually get read for a second. | ||
| 2422 | And on hpux, since we turn off polling in wait_reading_process_input, | ||
| 2423 | it might never get read at all if we don't spend much time | ||
| 2424 | outside of wait_reading_process_input. */ | ||
| 2425 | if (XINT (read_kbd) && interrupt_input | ||
| 2426 | && keyboard_bit_set (&Available) | ||
| 2427 | && input_polling_used ()) | ||
| 2428 | kill (getpid (), SIGALRM); | ||
| 2429 | #endif | ||
| 2430 | |||
| 2416 | /* Check for keyboard input */ | 2431 | /* Check for keyboard input */ |
| 2417 | /* If there is any, return immediately | 2432 | /* If there is any, return immediately |
| 2418 | to give it higher priority than subprocesses */ | 2433 | to give it higher priority than subprocesses */ |
| @@ -2430,6 +2445,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2430 | && requeued_events_pending_p ()) | 2445 | && requeued_events_pending_p ()) |
| 2431 | break; | 2446 | break; |
| 2432 | 2447 | ||
| 2448 | #if 0 | ||
| 2433 | /* If wait_for_cell. check for keyboard input | 2449 | /* If wait_for_cell. check for keyboard input |
| 2434 | but don't run any timers. | 2450 | but don't run any timers. |
| 2435 | ??? (It seems wrong to me to check for keyboard | 2451 | ??? (It seems wrong to me to check for keyboard |
| @@ -2443,19 +2459,20 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2443 | if (detect_input_pending ()) | 2459 | if (detect_input_pending ()) |
| 2444 | break; | 2460 | break; |
| 2445 | } | 2461 | } |
| 2462 | #endif | ||
| 2446 | 2463 | ||
| 2447 | /* Exit now if the cell we're waiting for became non-nil. */ | 2464 | /* Exit now if the cell we're waiting for became non-nil. */ |
| 2448 | if (wait_for_cell && ! NILP (*wait_for_cell)) | 2465 | if (wait_for_cell && ! NILP (*wait_for_cell)) |
| 2449 | break; | 2466 | break; |
| 2450 | 2467 | ||
| 2451 | #ifdef SIGIO | 2468 | #ifdef SIGIO |
| 2452 | /* If we think we have keyboard input waiting, but didn't get SIGIO | 2469 | /* If we think we have keyboard input waiting, but didn't get SIGIO, |
| 2453 | go read it. This can happen with X on BSD after logging out. | 2470 | go read it. This can happen with X on BSD after logging out. |
| 2454 | In that case, there really is no input and no SIGIO, | 2471 | In that case, there really is no input and no SIGIO, |
| 2455 | but select says there is input. */ | 2472 | but select says there is input. */ |
| 2456 | 2473 | ||
| 2457 | if (XINT (read_kbd) && interrupt_input | 2474 | if (XINT (read_kbd) && interrupt_input |
| 2458 | && (keyboard_bit_set (&Available))) | 2475 | && keyboard_bit_set (&Available)) |
| 2459 | kill (getpid (), SIGIO); | 2476 | kill (getpid (), SIGIO); |
| 2460 | #endif | 2477 | #endif |
| 2461 | 2478 | ||
| @@ -2575,7 +2592,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 2575 | Causes "poll: interrupted system call" messages when Emacs is run | 2592 | Causes "poll: interrupted system call" messages when Emacs is run |
| 2576 | in an X window | 2593 | in an X window |
| 2577 | Turn periodic alarms back on */ | 2594 | Turn periodic alarms back on */ |
| 2578 | start_polling(); | 2595 | start_polling (); |
| 2579 | #endif | 2596 | #endif |
| 2580 | 2597 | ||
| 2581 | return got_some_input; | 2598 | return got_some_input; |