Mercurial > hg > xemacs-beta
comparison src/s/gnu.h @ 367:a4f53d9b3154 r21-1-13
Import from CVS: tag r21-1-13
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:01:07 +0200 |
parents | 30d2cfa1092a |
children | cc15677e0335 |
comparison
equal
deleted
inserted
replaced
366:83d76f480a59 | 367:a4f53d9b3154 |
---|---|
81 | 81 |
82 #define PTY_TTY_NAME_SPRINTF \ | 82 #define PTY_TTY_NAME_SPRINTF \ |
83 { \ | 83 { \ |
84 char *ptsname(), *ptyname; \ | 84 char *ptsname(), *ptyname; \ |
85 \ | 85 \ |
86 sigblock(sigmask(SIGCHLD)); \ | 86 EMACS_BLOCK_SIGNAL (SIGCHLD); \ |
87 if (grantpt(fd) == -1) \ | 87 if (grantpt(fd) == -1) \ |
88 fatal("could not grant slave pty"); \ | 88 fatal("could not grant slave pty"); \ |
89 if (unlockpt(fd) == -1) \ | 89 if (unlockpt(fd) == -1) \ |
90 fatal("could not unlock slave pty"); \ | 90 fatal("could not unlock slave pty"); \ |
91 if (!(ptyname = ptsname(fd))) \ | 91 if (!(ptyname = ptsname(fd))) \ |
92 fatal ("could not enable slave pty"); \ | 92 fatal ("could not enable slave pty"); \ |
93 strncpy(pty_name, ptyname, sizeof(pty_name)); \ | 93 strncpy(pty_name, ptyname, sizeof(pty_name)); \ |
94 pty_name[sizeof(pty_name) - 1] = 0; \ | 94 pty_name[sizeof(pty_name) - 1] = 0; \ |
95 sigsetmask(siggetmask() & ~sigmask(SIGCHLD)); \ | 95 EMACS_UNBLOCK_SIGNAL (SIGCHLD); \ |
96 } | 96 } |
97 | 97 |
98 #endif | 98 #endif |