comparison src/process.c @ 3953:d0c23febc08c

(wait_reading_process_input): Do include the keyboard in the select, if read_kbd was a cons cell.
author Richard M. Stallman <rms@gnu.org>
date Fri, 02 Jul 1993 05:43:43 +0000
parents 55ed7a65746e
children 2fe1488b503c
comparison
equal deleted inserted replaced
3952:f9dfc2872fb0 3953:d0c23febc08c
1656 static int waiting_for_user_input_p; 1656 static int waiting_for_user_input_p;
1657 1657
1658 /* Read and dispose of subprocess output while waiting for timeout to 1658 /* Read and dispose of subprocess output while waiting for timeout to
1659 elapse and/or keyboard input to be available. 1659 elapse and/or keyboard input to be available.
1660 1660
1661 time_limit is: 1661 TIME_LIMIT is:
1662 timeout in seconds, or 1662 timeout in seconds, or
1663 zero for no limit, or 1663 zero for no limit, or
1664 -1 means gobble data immediately available but don't wait for any. 1664 -1 means gobble data immediately available but don't wait for any.
1665 1665
1666 microsecs is: 1666 MICROSECS is:
1667 an additional duration to wait (if time_limit is greater than 1667 an additional duration to wait, measured in microseconds.
1668 zero), specified in millisec. 1668 If this is nonzero and time_limit is 0, then the timeout
1669 1669 consists of MICROSECS only.
1670 read_kbd is a lisp value: 1670
1671 READ_KBD is a lisp value:
1671 0 to ignore keyboard input, or 1672 0 to ignore keyboard input, or
1672 1 to return when input is available, or 1673 1 to return when input is available, or
1673 -1 meaning caller will actually read the input, so don't throw to 1674 -1 meaning caller will actually read the input, so don't throw to
1674 the quit handler, or 1675 the quit handler, or
1675 a cons cell, meaning wait wait until its car is non-nil, or 1676 a cons cell, meaning wait wait until its car is non-nil
1677 (and gobble terminal input into the buffer if any arrives), or
1676 a process object, meaning wait until something arrives from that 1678 a process object, meaning wait until something arrives from that
1677 process. The return value is true iff we read some input from 1679 process. The return value is true iff we read some input from
1678 that process. 1680 that process.
1679 1681
1680 do_display != 0 means redisplay should be done to show subprocess 1682 DO_DISPLAY != 0 means redisplay should be done to show subprocess
1681 output that arrives. 1683 output that arrives.
1682 1684
1683 If read_kbd is a pointer to a struct Lisp_Process, then the 1685 If READ_KBD is a pointer to a struct Lisp_Process, then the
1684 function returns true iff we received input from that process 1686 function returns true iff we received input from that process
1685 before the timeout elapsed. 1687 before the timeout elapsed.
1686 Otherwise, return true iff we received input from any process. */ 1688 Otherwise, return true iff we received input from any process. */
1687 1689
1688 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) 1690 wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
1797 } 1799 }
1798 1800
1799 /* Wait till there is something to do */ 1801 /* Wait till there is something to do */
1800 1802
1801 Available = input_wait_mask; 1803 Available = input_wait_mask;
1802 if (! XINT (read_kbd)) 1804 if (! XINT (read_kbd) && wait_for_cell == 0)
1803 FD_CLR (0, &Available); 1805 FD_CLR (0, &Available);
1804 1806
1805 /* If frame size has changed or the window is newly mapped, 1807 /* If frame size has changed or the window is newly mapped,
1806 redisplay now, before we start to wait. There is a race 1808 redisplay now, before we start to wait. There is a race
1807 condition here; if a SIGIO arrives between now and the select 1809 condition here; if a SIGIO arrives between now and the select