comparison src/s/hpux.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
184 char *ptsname(), *ptyname; \ 184 char *ptsname(), *ptyname; \
185 struct group *getgrnam (), *tty_group = getgrnam ("tty"); \ 185 struct group *getgrnam (), *tty_group = getgrnam ("tty"); \
186 if (tty_group == NULL) \ 186 if (tty_group == NULL) \
187 fatal ("group tty not found"); \ 187 fatal ("group tty not found"); \
188 \ 188 \
189 sigblock(sigmask(SIGCHLD)); \ 189 EMACS_BLOCK_SIGNAL (SIGCHLD); \
190 if (grantpt(fd) == -1) \ 190 if (grantpt(fd) == -1) \
191 fatal("could not grant slave pty"); \ 191 fatal("could not grant slave pty"); \
192 if (!(ptyname = ptsname(fd))) \ 192 if (!(ptyname = ptsname(fd))) \
193 fatal ("could not enable slave pty"); \ 193 fatal ("could not enable slave pty"); \
194 strncpy(pty_name, ptyname, sizeof(pty_name)); \ 194 strncpy(pty_name, ptyname, sizeof(pty_name)); \
195 pty_name[sizeof(pty_name) - 1] = 0; \ 195 pty_name[sizeof(pty_name) - 1] = 0; \
196 if (chown (pty_name, (uid_t) -1, tty_group->gr_gid) == -1) \ 196 if (chown (pty_name, (uid_t) -1, tty_group->gr_gid) == -1) \
197 fatal ("could not chown slave pty"); \ 197 fatal ("could not chown slave pty"); \
198 if (unlockpt(fd) == -1) \ 198 if (unlockpt(fd) == -1) \
199 fatal("could not unlock slave pty"); \ 199 fatal("could not unlock slave pty"); \
200 sigunblock(sigmask(SIGCHLD)); \ 200 EMACS_UNBLOCK_SIGNAL (SIGCHLD); \
201 } 201 }
202 202
203 /* Push various streams modules onto a PTY channel. */ 203 /* Push various streams modules onto a PTY channel. */
204 204
205 #define SETUP_SLAVE_PTY \ 205 #define SETUP_SLAVE_PTY \