Here is a very quick patch that seems to work to support the new
/dev/pts on linux glibc2.1.
Obviously, better integration is needed. I suppose HAVE_GETPT needs
to be added to autoconf.
retrieving revision 1.11.2.5
diff -u -r1.11.2.5 process-unix.c
--- process-unix.c 1998/12/29 10:54:27 1.11.2.5
+++ process-unix.c 1999/07/26 02:39:07
@@ -216,6 +216,23 @@
int fd;
int c;
+#ifdef LINUX
+#define HAVE_GETPT
+#endif
+
+#ifdef HAVE_GETPT
+#define PTY_ITERATION
+#define PTY_OPEN \
+ { \
+ int e; \
+ fd = getpt(); \
+ if (fd < 0) return fd; \
+ if ((e = grantpt (fd)) < 0) return e; \
+ if ((e = unlockpt (fd)) < 0) return e; \
+ }
+#define PTY_TTY_NAME_SPRINTF ptsname_r (fd, pty_name, sizeof (pty_name));
+#endif
+
#ifdef PTY_ITERATION
PTY_ITERATION
#else
@@ -265,7 +282,7 @@
if (access (pty_name, 6) != 0)
{
close (fd);
-#if !defined(IRIS) && !defined(__sgi)
+#if !defined(IRIS) && !defined(__sgi) && !defined (HAVE_GETPT)
continue;
#else
return -1;