summaryrefslogtreecommitdiff
path: root/src/s/irix5-0.h
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-07-23 04:16:38 +0000
committerRichard M. Stallman <rms@gnu.org>1993-07-23 04:16:38 +0000
commit6e27eb5e02b615708dc55514f37a51dfc451bf28 (patch)
tree0c27ec854fda97aa343553f6bf86fa40d0006741 /src/s/irix5-0.h
parent785080c58c4f792c5474a6a6b9226697268525bd (diff)
downloademacs-6e27eb5e02b615708dc55514f37a51dfc451bf28.tar.gz
(PTY_OPEN): Use sigaction, not sigsetmask.
Diffstat (limited to 'src/s/irix5-0.h')
-rw-r--r--src/s/irix5-0.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/s/irix5-0.h b/src/s/irix5-0.h
index fe42458768a..61928f08dfe 100644
--- a/src/s/irix5-0.h
+++ b/src/s/irix5-0.h
@@ -48,17 +48,26 @@ char *_getpty();
#define PTY_ITERATION
/* Here is how to do it. */
/* It is necessary to prevent SIGCHLD signals within _getpty.
- So we block them. */
-#define PTY_OPEN \
-{ \
- int mask = sigblock (sigmask (SIGCHLD)); \
- char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
- sigsetmask(mask); \
- if (name == 0) \
- return -1; \
- if (fd < 0) \
- return -1; \
- if (fstat (fd, &stb) < 0) \
- return -1; \
- strcpy (pty_name, name); \
+ So we block them. But since all of Emacs uses classic SYSV signal()
+ signals, there is no reliable way to do this (unlike BSD sighold or
+ POSIX sigaction). On Irix 5.* systems, the implementation of
+ sigaction is as close as you can get to a universal. */
+#define PTY_OPEN \
+{ \
+ struct sigaction ocstat, cstat; \
+ char * name; \
+ sigemptyset(&cstat.sa_mask); \
+ cstat.sa_handler = SIG_DFL; \
+ cstat.sa_flags = 0; \
+ sigaction(SIGCLD, &cstat, &ocstat); \
+ name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
+ sigaction(SIGCLD, &ocstat, (struct sigaction *)0); \
+ if (name == 0) \
+ return -1; \
+ if (fd < 0) \
+ return -1; \
+ if (fstat (fd, &stb) < 0) \
+ return -1; \
+ strcpy (pty_name, name); \
}
+