Mercurial > emacs
comparison src/process.c @ 18378:22cd8d7dd5aa
(wait_reading_process_input): Don't check for
keyboard input if wait_for_cell.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 22 Jun 1997 09:06:04 +0000 |
| parents | ddaafa596bf5 |
| children | 668304de6f92 |
comparison
equal
deleted
inserted
replaced
| 18377:8b4a66c66dd6 | 18378:22cd8d7dd5aa |
|---|---|
| 2411 If you find a Solaris expert somewhere, they might know | 2411 If you find a Solaris expert somewhere, they might know |
| 2412 better." */ | 2412 better." */ |
| 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 */ |
| 2419 | 2434 |
| 2420 if ((XINT (read_kbd) != 0) | 2435 if ((XINT (read_kbd) != 0) |
| 2428 /* If there is unread keyboard input, also return. */ | 2443 /* If there is unread keyboard input, also return. */ |
| 2429 if (XINT (read_kbd) != 0 | 2444 if (XINT (read_kbd) != 0 |
| 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 |
| 2436 input at all when wait_for_cell, but the code | 2452 input at all when wait_for_cell, but the code |
| 2437 has been this way since July 1994. | 2453 has been this way since July 1994. |
| 2441 { | 2457 { |
| 2442 swallow_events (do_display); | 2458 swallow_events (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 |
| 2462 if (! wait_proc) | 2479 if (! wait_proc) |
| 2463 got_some_input |= nfds > 0; | 2480 got_some_input |= nfds > 0; |
| 2573 /* AlainF 5-Jul-1996 | 2590 /* AlainF 5-Jul-1996 |
| 2574 HP-UX 10.10 seems to have problems with signals coming in | 2591 HP-UX 10.10 seems to have problems with signals coming in |
| 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; |
| 2582 } | 2599 } |
| 2583 | 2600 |
