IO::Tty::Util - Perl bindings for libutil.so tty utility functions
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.
openpty
login_tty
libutil.so
forkpty
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.
fork
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.
name
struct termios
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.
To install IO::Tty::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Tty::Util
CPAN shell
perl -MCPAN -e shell install IO::Tty::Util
For more information on module installation, please visit the detailed CPAN module installation guide.