Mercurial > hg > xemacs-beta
comparison src/s/linux.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 |
---|---|
225 | 225 |
226 #define PTY_TTY_NAME_SPRINTF \ | 226 #define PTY_TTY_NAME_SPRINTF \ |
227 { \ | 227 { \ |
228 char *ptsname(), *ptyname; \ | 228 char *ptsname(), *ptyname; \ |
229 \ | 229 \ |
230 sigblock(sigmask(SIGCHLD)); \ | 230 EMACS_BLOCK_SIGNAL (SIGCHLD); \ |
231 if (grantpt(fd) == -1) \ | 231 if (grantpt(fd) == -1) \ |
232 fatal("could not grant slave pty"); \ | 232 fatal("could not grant slave pty"); \ |
233 if (unlockpt(fd) == -1) \ | 233 if (unlockpt(fd) == -1) \ |
234 fatal("could not unlock slave pty"); \ | 234 fatal("could not unlock slave pty"); \ |
235 if (!(ptyname = ptsname(fd))) \ | 235 if (!(ptyname = ptsname(fd))) \ |
236 fatal ("could not enable slave pty"); \ | 236 fatal ("could not enable slave pty"); \ |
237 strncpy(pty_name, ptyname, sizeof(pty_name)); \ | 237 strncpy(pty_name, ptyname, sizeof(pty_name)); \ |
238 pty_name[sizeof(pty_name) - 1] = 0; \ | 238 pty_name[sizeof(pty_name) - 1] = 0; \ |
239 sigsetmask(siggetmask() & ~sigmask(SIGCHLD)); \ | 239 EMACS_UNBLOCK_SIGNAL (SIGCHLD); \ |
240 } | 240 } |
241 | 241 |
242 #endif | 242 #endif |