| IO-Tty-Util documentation | view source | Contained in the IO-Tty-Util distribution. |
use IO::Tty::Util qw(openpty login_tty forkpty) ; my ($master, $slave) = openpty(25, 80) ; my %ok = login_tty($slave) ; my ($pid, $master) = forkpty(25, 80, "/usr/bin/top") ;
IO::Tty::Util provides basic Perl bindings to the openpty and login_tty functions
found in libutil.so and provides a Perl implementation of the forkpty function.
Opens a pseudo-tty. Returns returns the master and slave handles on success, or an empty list on error.
Prepares for a login on tty handle HANDLE. Returns true on success or false on error.
Combines openpty, fork and login_tty to create a new process operating in a
pseudo-tty. Returns the pid and master handle on success, or an empty list on error.
None by default.
IO::Tty provides a lower level interface to ttys.
openpty(3), login_tty(3), forkpty(3).
The current implementation does not support passing the name parameter or the
struct termios terminal properties parameter to openpty and forkpty.
Patrick LeBoutillier, <patl@cpan.org>
Copyright (C) 2006-2007 by Patrick LeBoutillier
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
| IO-Tty-Util documentation | view source | Contained in the IO-Tty-Util distribution. |