#define HAVE_WAIT_HEADER
#define WAITTYPE int
#define wait3(status, options, rusage) \
- waitpid((pid_t) -1, (status), (options))
+ waitpid ((pid_t) -1, (status), (options))
#define WRETCODE(w) (w >> 8)
/* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
intercepting that death. If any child but grantpt's should die
within, it should be caught after sigrelse(2). */
-#define PTY_TTY_NAME_SPRINTF \
- { \
- char *ptsname(), *ptyname; \
- \
- sighold(SIGCLD); \
- if (grantpt(fd) == -1) \
- fatal("could not grant slave pty"); \
- sigrelse(SIGCLD); \
- if (unlockpt(fd) == -1) \
- fatal("could not unlock slave pty"); \
- if (!(ptyname = ptsname(fd))) \
- fatal ("could not enable slave pty"); \
- strncpy(pty_name, ptyname, sizeof(pty_name)); \
- pty_name[sizeof(pty_name) - 1] = 0; \
+#define PTY_TTY_NAME_SPRINTF \
+ { \
+ char *ptsname (), *ptyname; \
+ \
+ sighold (SIGCLD); \
+ if (grantpt (fd) == -1) \
+ { close (fd); return -1; } \
+ sigrelse (SIGCLD); \
+ if (unlockpt (fd) == -1) \
+ { close (fd); return -1; } \
+ if (!(ptyname = ptsname (fd))) \
+ { close (fd); return -1; } \
+ strncpy (pty_name, ptyname, sizeof (pty_name)); \
+ pty_name[sizeof (pty_name) - 1] = 0; \
}
/* Push various streams modules onto a PTY channel. */
So give it a try. */
#define HAVE_SOCKETS
-#define bcopy(src,dst,n) memmove(dst,src,n)
-#define bcmp(src,dst,n) memcmp(src,dst,n)
-#define bzero(s,n) memset(s,0,n)
+#define bcopy(src,dst,n) memmove (dst,src,n)
+#define bcmp(src,dst,n) memcmp (src,dst,n)
+#define bzero(s,n) memset (s,0,n)