aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-11 03:42:57 +0000
committerRichard M. Stallman1994-08-11 03:42:57 +0000
commitc764f95fab66ee945b884d8a609347f2a6574208 (patch)
treef29f45bb793e6dfc3cf86a7db7a9aa464aa223a2 /src
parent8d40872b18967a419df4bc10df422928d6e057e1 (diff)
downloademacs-c764f95fab66ee945b884d8a609347f2a6574208.tar.gz
emacs-c764f95fab66ee945b884d8a609347f2a6574208.zip
(POSIX_SIGNALS): Define it.
(PTY_TTY_NAME_SPRINTF): New overriding definition. (sigsetmask): Add #undefs.
Diffstat (limited to 'src')
-rw-r--r--src/s/sol2-3.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/s/sol2-3.h b/src/s/sol2-3.h
index d17ec1851bc..2e5d068d193 100644
--- a/src/s/sol2-3.h
+++ b/src/s/sol2-3.h
@@ -16,3 +16,35 @@
16#define LD_SWITCH_SYSTEM -L /usr/ccs/lib \ 16#define LD_SWITCH_SYSTEM -L /usr/ccs/lib \
17 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX` 17 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX`
18#endif /* GCC */ 18#endif /* GCC */
19
20/* Info from fnf@cygnus.com suggests this is appropriate. */
21#define POSIX_SIGNALS
22
23/* We don't need the definition from usg5-3.h with POSIX_SIGNALS. */
24#undef sigsetmask
25
26/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
27 rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
28 work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
29 (x<2) but I'm not sure. fnf@cygnus.com */
30/* This sets the name of the slave side of the PTY. On SysVr4,
31 grantpt(3) forks a subprocess, so keep sigchld_handler() from
32 intercepting that death. If any child but grantpt's should die
33 within, it should be caught after sigrelse(2). */
34
35#undef PTY_TTY_NAME_SPRINTF
36#define PTY_TTY_NAME_SPRINTF \
37 { \
38 char *ptsname(), *ptyname; \
39 \
40 sigblock(sigmask(SIGCLD)); \
41 if (grantpt(fd) == -1) \
42 fatal("could not grant slave pty"); \
43 sigunblock(sigmask(SIGCLD)); \
44 if (unlockpt(fd) == -1) \
45 fatal("could not unlock slave pty"); \
46 if (!(ptyname = ptsname(fd))) \
47 fatal ("could not enable slave pty"); \
48 strncpy(pty_name, ptyname, sizeof(pty_name)); \
49 pty_name[sizeof(pty_name) - 1] = 0; \
50 }