[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [#189 Graphics does not work on Debian] See
From: |
Bob McElrath |
Subject: |
[Axiom-developer] [#189 Graphics does not work on Debian] See |
Date: |
Mon, 04 Jul 2005 16:53:14 -0500 |
Changes
http://page.axiom-developer.org/zope/mathaction/189GraphicsDoesNotWorkOnDebian/diff
--
You must be running on a system which does not have Unix98 pty's. (e.g.
/dev/ptmx) As this is by now an old standard, I'm confused why so many
people are running into this problem. It's included since the 2.1
series of linux kernels. Could you provide some more information about
your distro/kernel? Specifically, kernel version, distro version, does
/dev/ptmx exist? Is devpts mounted? Does chroot prevent you from using
ptmx due to file premissions? What/how is your chroot set up? Is it a
common configuration? Is it something you did by hand or did you
install some debian package which did it for you?
If machines with this problem are so common, we can fix it by falling
back to the BSD-style pty allocation in src/lib/openpty.c.pamphlet
(patch follows). Reporter: can you answer the above questions and/or
test the below patch?
--- openpty.c.pamphlet.orig 2005-07-04 14:37:38.000000000 -0700
+++ openpty.c.pamphlet 2005-07-04 14:39:23.000000000 -0700
@@ -177,9 +177,32 @@
if (ioctl(fds, I_PUSH, "ldterm") < 0)
perror("ptyopen: Failed to push idterm");
#endif
+#if defined(LINUXplatform) /* Linux with old-style BSD pty's (not Unix98
devpts) */
+ int looking = 1, i;
+ int oflag = O_RDWR; /* flag for opening the pty */
+
+ for (i = 0; looking && i < 1000; i++) {
+ makeNextPtyNames(controllerPath, serverPath);
+ if (access(controllerPath, 6) != 0) continue;
+ *controller = open(controllerPath, oflag, 0);
+ if (*controller >= 0) {
+ *server = open(serverPath, oflag, 0);
+ if (*server > 0)
+ looking = 0;
+ else
+ close(*controller);
+ }
+ }
+ if (looking) {
+ fprintf(stderr, "Couldn't find a free pty.\n");
+ exit(-1);
+ }
+ return (*controller);
+#else
strcpy(serverPath,slavename);
*controller=fdm;
*server=fds;
+#endif
}
}
return(fdm);
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden