aboutsummaryrefslogtreecommitdiffstats
path: root/src/s/gnu-linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/s/gnu-linux.h')
-rw-r--r--src/s/gnu-linux.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index f5419a6e3af..86fc78b8b0f 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -77,14 +77,15 @@ Boston, MA 02111-1307, USA. */
77#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); 77#define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
78 78
79#undef PTY_TTY_NAME_SPRINTF 79#undef PTY_TTY_NAME_SPRINTF
80/* This used to use SIGCLD, but that doesn't appear in glibc 2.1. */
80#define PTY_TTY_NAME_SPRINTF \ 81#define PTY_TTY_NAME_SPRINTF \
81 { \ 82 { \
82 char *ptsname (), *ptyname; \ 83 char *ptsname (), *ptyname; \
83 \ 84 \
84 sigblock (sigmask (SIGCLD)); \ 85 sigblock (sigmask (SIGCHLD)); \
85 if (grantpt (fd) == -1) \ 86 if (grantpt (fd) == -1) \
86 { close (fd); return -1; } \ 87 { close (fd); return -1; } \
87 sigunblock (sigmask (SIGCLD)); \ 88 sigunblock (sigmask (SIGCHLD)); \
88 if (unlockpt (fd) == -1) \ 89 if (unlockpt (fd) == -1) \
89 { close (fd); return -1; } \ 90 { close (fd); return -1; } \
90 if (!(ptyname = ptsname (fd))) \ 91 if (!(ptyname = ptsname (fd))) \