Mercurial > emacs
changeset 27430:1aa71680fe50
(toplevel): Include atimer.h.
(create_process_1): Rewritten.
(create_process): Use atimers instead of alarm.
(wait_reading_process_input) [hpux]: Turn atimers off instead
of turning off SIGALRM.
(wait_reading_process_input): Turn off atimers instead off
calling stop_polling.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 25 Jan 2000 15:56:42 +0000 |
parents | 1bf632297f7d |
children | 92e0ea1917dd |
files | src/process.c |
diffstat | 1 files changed, 24 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/process.c Tue Jan 25 15:55:49 2000 +0000 +++ b/src/process.c Tue Jan 25 15:56:42 2000 +0000 @@ -109,6 +109,7 @@ #include "keyboard.h" #include "dispextern.h" #include "composite.h" +#include "atimer.h" #define max(a, b) ((a) > (b) ? (a) : (b)) @@ -1237,18 +1238,14 @@ return Qnil; } - -SIGTYPE -create_process_1 (signo) - int signo; +void +create_process_1 (timer) + struct atimer *timer; { -#if defined (USG) && !defined (POSIX_SIGNALS) - /* USG systems forget handlers when they are used; - must reestablish each time */ - signal (signo, create_process_1); -#endif /* USG */ + /* Nothing to do. */ } + #if 0 /* This doesn't work; see the note before sigchld_handler. */ #ifdef USG #ifdef SIGCHLD @@ -1685,14 +1682,22 @@ /* If the subfork execv fails, and it exits, this close hangs. I don't know why. So have an interrupt jar it loose. */ - stop_polling (); - signal (SIGALRM, create_process_1); - alarm (1); - XPROCESS (process)->subtty = Qnil; - if (forkin >= 0) - emacs_close (forkin); - alarm (0); - start_polling (); + { + struct atimer *timer; + EMACS_TIME offset; + + stop_polling (); + EMACS_SET_SECS_USECS (offset, 1, 0); + timer = start_atimer (ATIMER_RELATIVE, offset, create_process_1, 0); + + XPROCESS (process)->subtty = Qnil; + if (forkin >= 0) + emacs_close (forkin); + + cancel_atimer (timer); + start_polling (); + } + if (forkin != forkout && forkout >= 0) emacs_close (forkout); @@ -2369,7 +2374,7 @@ Causes "poll: interrupted system call" messages when Emacs is run in an X window Turn off periodic alarms (in case they are in use) */ - stop_polling (); + turn_on_atimers (0); #endif while (1) @@ -4745,7 +4750,7 @@ /* Turn off periodic alarms (in case they are in use) because the select emulator uses alarms. */ - stop_polling (); + turn_on_atimers (0); while (1) {