]> code.delx.au - gnu-emacs/blobdiff - src/s/sol2-3.h
(POSIX_SIGNALS): Defined.
[gnu-emacs] / src / s / sol2-3.h
index ac80a2ff1200206a5c88a0dab4800601a43820c7..b45ec57ef1f270150a70ed7b99a2864a71441b16 100644 (file)
 #undef PTY_TTY_NAME_SPRINTF
 #define PTY_TTY_NAME_SPRINTF                   \
   {                                            \
-    char *ptsname(), *ptyname;                 \
+    char *ptsname (), *ptyname;                        \
                                                \
-    sigblock(sigmask(SIGCLD));                 \
-    if (grantpt(fd) == -1)                     \
-      fatal("could not grant slave pty");      \
-    sigunblock(sigmask(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;                \
+    sigblock (sigmask (SIGCLD));               \
+    if (grantpt (fd) == -1)                    \
+      { emacs_close (fd); return -1; }         \
+    sigunblock (sigmask (SIGCLD));             \
+    if (unlockpt (fd) == -1)                   \
+      { emacs_close (fd); return -1; }         \
+    if (!(ptyname = ptsname (fd)))             \
+      { emacs_close (fd); return -1; }         \
+    strncpy (pty_name, ptyname, sizeof (pty_name)); \
+    pty_name[sizeof (pty_name) - 1] = 0;       \
   }
 
-/* David Miller <davem@caip.rutgers.edu> says vfork fails on 2.4.
-   Brendan Kehoe <brendan@zen.org> says it also fails on 2.3.
-   So we'll use the alternate definition in sysdep.c.
-   But a header file has a declaration
-   that would conflict with the definition of vfork in sysdep.c.
-   So we'll choose the return type to match the system header.  */
-#undef HAVE_VFORK
-#define VFORK_RETURN_TYPE pid_t
+/* arch-tag: a8fe2e15-e517-49cb-a863-f346b80885fe
+   (do not change this comment) */