IO::Tty::Util - Perl bindings for libutil.so tty utility functions


IO-Tty-Util documentation  | view source Contained in the IO-Tty-Util distribution.

Index


SYNOPSIS

Top

  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") ;




DESCRIPTION

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.

FUNCTIONS

Top

openpty ( $ROWS, $COLS )

Opens a pseudo-tty. Returns returns the master and slave handles on success, or an empty list on error.

login_tty ( $HANDLE )

Prepares for a login on tty handle HANDLE. Returns true on success or false on error.

forkpty ( $ROWS, $COLS, @COMMAND )

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.

EXPORT

None by default.

SEE ALSO

Top

IO::Tty provides a lower level interface to ttys.

openpty(3), login_tty(3), forkpty(3).

BUGS AND DEFICIENCIES

Top

Incomplete Support

The current implementation does not support passing the name parameter or the struct termios terminal properties parameter to openpty and forkpty.

AUTHOR

Top

Patrick LeBoutillier, <patl@cpan.org>

COPYRIGHT AND LICENSE

Top


IO-Tty-Util documentation  | view source Contained in the IO-Tty-Util distribution.