diff options
| author | Jim Blandy | 1992-05-01 06:20:46 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-05-01 06:20:46 +0000 |
| commit | 32676c085ce177af1e1e8ab61360c68772450af0 (patch) | |
| tree | 6c8e9d6bc310b894409ae82fe957d1cd518c8e4d /src/process.c | |
| parent | d9a0f717d7057092d81b6cfc9acf06e3afcd13bd (diff) | |
| download | emacs-32676c085ce177af1e1e8ab61360c68772450af0.tar.gz emacs-32676c085ce177af1e1e8ab61360c68772450af0.zip | |
*** empty log message ***
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c index 442cae6d159..d9e2734957f 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -108,8 +108,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 108 | #include "termhooks.h" | 108 | #include "termhooks.h" |
| 109 | #include "termopts.h" | 109 | #include "termopts.h" |
| 110 | #include "commands.h" | 110 | #include "commands.h" |
| 111 | 111 | #include "dispextern.h" | |
| 112 | extern int screen_garbaged; | ||
| 113 | 112 | ||
| 114 | Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed; | 113 | Lisp_Object Qrun, Qstop, Qsignal, Qopen, Qclosed; |
| 115 | /* Qexit is declared and initialized in eval.c. */ | 114 | /* Qexit is declared and initialized in eval.c. */ |
| @@ -419,6 +418,13 @@ allocate_pty () | |||
| 419 | register c, i; | 418 | register c, i; |
| 420 | int fd; | 419 | int fd; |
| 421 | 420 | ||
| 421 | /* Some systems name their pseudoterminals so that there are gaps in | ||
| 422 | the usual sequence - for example, on HP9000/S700 systems, there | ||
| 423 | are no pseudoterminals with names ending in 'f'. So we wait for | ||
| 424 | three failures in a row before deciding that we've reached the | ||
| 425 | end of the ptys. */ | ||
| 426 | int failed_count = 0; | ||
| 427 | |||
| 422 | #ifdef PTY_ITERATION | 428 | #ifdef PTY_ITERATION |
| 423 | PTY_ITERATION | 429 | PTY_ITERATION |
| 424 | #else | 430 | #else |
| @@ -440,20 +446,27 @@ allocate_pty () | |||
| 440 | #endif /* not HPUX */ | 446 | #endif /* not HPUX */ |
| 441 | #endif /* no PTY_NAME_SPRINTF */ | 447 | #endif /* no PTY_NAME_SPRINTF */ |
| 442 | 448 | ||
| 443 | #ifndef IRIS | 449 | #ifdef IRIS |
| 444 | if (stat (pty_name, &stb) < 0) | 450 | /* Unusual IRIS code */ |
| 451 | *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0); | ||
| 452 | if (fd < 0) | ||
| 453 | return -1; | ||
| 454 | if (fstat (fd, &stb) < 0) | ||
| 445 | return -1; | 455 | return -1; |
| 456 | #else | ||
| 457 | if (stat (pty_name, &stb) < 0) | ||
| 458 | { | ||
| 459 | failed_count++; | ||
| 460 | if (failed_count >= 3) | ||
| 461 | return -1; | ||
| 462 | } | ||
| 463 | else | ||
| 464 | failed_count = 0; | ||
| 446 | #ifdef O_NONBLOCK | 465 | #ifdef O_NONBLOCK |
| 447 | fd = open (pty_name, O_RDWR | O_NONBLOCK, 0); | 466 | fd = open (pty_name, O_RDWR | O_NONBLOCK, 0); |
| 448 | #else | 467 | #else |
| 449 | fd = open (pty_name, O_RDWR | O_NDELAY, 0); | 468 | fd = open (pty_name, O_RDWR | O_NDELAY, 0); |
| 450 | #endif | 469 | #endif |
| 451 | #else /* Unusual IRIS code */ | ||
| 452 | *ptyv = open ("/dev/ptc", O_RDWR | O_NDELAY, 0); | ||
| 453 | if (fd < 0) | ||
| 454 | return -1; | ||
| 455 | if (fstat (fd, &stb) < 0) | ||
| 456 | return -1; | ||
| 457 | #endif /* IRIS */ | 470 | #endif /* IRIS */ |
| 458 | 471 | ||
| 459 | if (fd >= 0) | 472 | if (fd >= 0) |
| @@ -1742,11 +1755,6 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1742 | if (!read_kbd) | 1755 | if (!read_kbd) |
| 1743 | FD_CLR (0, &Available); | 1756 | FD_CLR (0, &Available); |
| 1744 | 1757 | ||
| 1745 | /* If a screen has been newly mapped and needs updating, | ||
| 1746 | reprocess its display stuff. */ | ||
| 1747 | if (screen_garbaged) | ||
| 1748 | redisplay_preserve_echo_area (); | ||
| 1749 | |||
| 1750 | if (read_kbd && detect_input_pending ()) | 1758 | if (read_kbd && detect_input_pending ()) |
| 1751 | nfds = 0; | 1759 | nfds = 0; |
| 1752 | else | 1760 | else |
| @@ -1829,6 +1837,16 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 1829 | if (! wait_proc) | 1837 | if (! wait_proc) |
| 1830 | got_some_input |= nfds > 0; | 1838 | got_some_input |= nfds > 0; |
| 1831 | 1839 | ||
| 1840 | /* If checking input just got us a size-change event from X, | ||
| 1841 | obey it now if we should. */ | ||
| 1842 | if (read_kbd) | ||
| 1843 | do_pending_window_change (); | ||
| 1844 | |||
| 1845 | /* If screen size has changed, redisplay now | ||
| 1846 | for either sit-for or keyboard input. */ | ||
| 1847 | if (read_kbd && screen_garbaged) | ||
| 1848 | redisplay_preserve_echo_area (); | ||
| 1849 | |||
| 1832 | /* Check for data from a process or a command channel */ | 1850 | /* Check for data from a process or a command channel */ |
| 1833 | for (channel = FIRST_PROC_DESC; channel < MAXDESC; channel++) | 1851 | for (channel = FIRST_PROC_DESC; channel < MAXDESC; channel++) |
| 1834 | { | 1852 | { |