use IO::Tty qw(TIOCNOTTY); ... # use only to import constants, see IO::Pty to create ptys.
Windows is now supported, but ONLY under the Cygwin environment, see <http://sources.redhat.com/cygwin/>.
Please note that pty creation is very system-dependend. From my experience, any modern POSIX system should be fine. Find below a list of systems that "IO::Tty" should work on. A more detailed table (which is slowly getting out-of-date) is available from the project pages document manager at SourceForge <http://sourceforge.net/projects/expectperl/>.
If you have problems on your system and your system is listed in the ``verified'' list, you probably have some non-standard setup, e.g. you compiled your Linux-kernel yourself and disabled ptys (bummer!). Please ask your friendly sysadmin for help.
If your system is not listed, unpack the latest version of "IO::Tty", do a 'perl Makefile.PL; make; make test; uname -a' and send me (RGiersig@cpan.org) the results and I'll see what I can deduce from that. There are chances that it will work right out-of-the-box...
If it's working on your system, please send me a short note with details (version number, distribution, etc. 'uname -a' and 'perl -V' is a good start; also, the output from ``perl Makefile.PL'' contains a lot of interesting info, so please include that as well) so I can get an overview. Thanks!
Returns EIO instead of EOF when the slave is closed. Benign.
EOF on the slave tty is not reported back to the master.
The ioctl TIOCSCTTY sometimes fails. This is also known in Tcl/Expect, see http://expect.nist.gov/FAQ.html
EOF on the slave tty is not reported back to the master.
EOF on the slave tty is not reported back to the master.
Returns EIO instead of EOF when the slave is closed. Benign.
EOF on the slave tty is not reported back to the master.
Has the ``feature'' of returning EOF just once?!
EOF on the slave tty is not reported back to the master.
When you send (print) a too long line (>160 chars) to a non-raw pty, the call just hangs forever and even alarm() cannot get you out. Don't complain to me...
EOF on the slave tty is not reported back to the master.
The following systems have not been verified yet for this version, but a previous version worked on them:
probably the same as the other *BSDs...
If you have additions to these lists, please mail them to <RGiersig@cpan.org>.
http://lists.sourceforge.net/lists/listinfo/expectperl-announce
and
http://lists.sourceforge.net/lists/listinfo/expectperl-discuss
Now maintained and heavily rewritten by Roland Giersig <RGiersig@cpan.org>.
Contains copyrighted stuff from openssh v3.0p1, authored by Tatu Ylonen <ylo@cs.hut.fi>, Markus Friedl and Todd C. Miller <Todd.Miller@courtesan.com>. I also got a lot of inspiry from the pty code in Xemacs.
Nevertheless the above AUTHORS retain their copyrights to the various parts and want to receive credit if their source code is used. See the source for details.
In other words: Use at your own risk. Provided as is. Your mileage may vary. Read the source, Luke!
And finally, just to be sure:
Any Use of This Product, in Any Manner Whatsoever, Will Increase the Amount of Disorder in the Universe. Although No Liability Is Implied Herein, the Consumer Is Warned That This Process Will Ultimately Lead to the Heat Death of the Universe.