luit-1.0.3-1: Couldn't allocate pty: No such file or directory
neomjp
neomjp@yahoo.co.jp
Thu Apr 30 11:38:00 GMT 2009
$ cygcheck -c luit
Cygwin Package Information
Package Version Status
luit 1.0.3-1 OK
$ /usr/bin/luit.exe
Couldn't allocate pty: No such file or directory
This error is caused by trying to opening a pseudo terminal in a BSD
way (instead of in a SVR4 or Unix-98 way). Here are the relevant parts
in sys.c:
#if (defined(__GLIBC__) && \
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))) || \
defined(SVR4)
#define HAVE_GRANTPT
#endif
...............................
int
allocatePty(int *pty_return, char **line_return)
{
char name[12], *line = NULL;
int pty = -1;
char *name1 = "pqrstuvwxyzPQRST",
*name2 = "0123456789abcdefghijklmnopqrstuv";
...............................
#ifdef HAVE_GRANTPT
................................
pty = open("/dev/ptmx", O_RDWR);
.....................................
#endif /* HAVE_GRANTPT */
strcpy(name, "/dev/pty??");
for(p1 = name1; *p1; p1++) {
name[8] = *p1;
for(p2 = name2; *p2; p2++) {
name[9] = *p2;
pty = open(name, O_RDWR);
In cygwin, the absense of __GLIBC__ or SVR4 causes HAVE_GRANTPT to be
undefined, and so the codes to use SVR4 (or Unix-98) pseudo terminals
are not enabled.
A simple fix is to add "|| defined(__CYGWIN__)",
but the recent master of luit has a better fix. It replaced "#if
(defined(__GLIBC__) && ..." with a real configure test for grantpt.
http://cgit.freedesktop.org/xorg/app/luit/commit/?h=4823838f77ab03cccd07860fdf8002bc577e0f04
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list