![]() ![]() The ioctl() returns -1, signaling an error, and errno is set to "invalid argument" - which could mean the file descriptor is bad, but that's not the case. But that's basically what seems to be happening. I don't know if that's really still the case currently. I did a web search and apparently at one time TIOCINQ was defined in Cygwin but did not work correctly. On FreeBSD and Mac it's defined as TIOCOUTQ, otherwise it's set to TIOCINQ if it's defined, otherwise to FIONREAD. The problem is, I think, that Cygwin doesn't support this particular ioctl.Īt the top of the file the ioctl is defined as PTY_BYTES_AVAILABLE. There's a function KPtyDevicePrivate::_k_canRead(), which uses an ioctl() to try to determine if there's data available to read from the TTY device (data coming in from the shell process). I just don't see anything on the terminal window. (EDIT): Also, when I type commands into the terminal, they are executed! I can even close the session by typing "exit". I'll get back to you guys if I'm able to work out the other issues. I know a little QT but not really enough to readily diagnose this. The terminal opens the PTY device, and it runs bash with the PTY device as its controlling TTY, but I still don't get anything on the display (it looks just like Anne's screen shot), menu bars don't work, etc. Unfortunately, after this change, it still doesn't appear to be working. Kpty.cpp won't use posix_openpt() unless either HAVE_PTSNAME or TIOCGPTN are defined (this is what causes the fallback to the BSD-style method that doesn't work), and posix_openpt() won't appear in the Cygwin system headers unless you supply the _XOPEN_SOURCE define. +DEFINES += _XOPEN_SOURCE=600 HAVE_POSIX_OPENPT HAVE_PTSNAME HAVE_SYS_TIME_H DEFINES += HAVE_POSIX_OPENPT HAVE_SYS_TIME_H You can correct that problem with a little change to qmltermwidget/qmltermwidget.pro: That code should come with a great big warning message saying "your build settings are broken!" - because it's almost certainly not the code you want to be running. The module is falling back on the bad, old BSD-style method (opening all the /dev/pty* devices until it finds one it's able to open) which has been removed from most systems for years. Yeah there's a problem compiling qmltermwidget/lib/kpty.cpp on Cygwin.īasically, kpty provides platform-abstraction for all the various different ways the OS might support creating a TTY device pair on different systems. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |