Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 866da32be9
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (14 sloc) 0.413 kb
# sample script to illustrate the -pty-fd option
use IO::Pty;
use Fcntl;
my $pty = new IO::Pty;
fcntl $pty, F_SETFD, 0; # clear close-on-exec
system "rxvt -pty-fd " . (fileno $pty) . "&";
close $pty;
# now communicate with rxvt
my $slave = $pty->slave;
print $slave "hi! please enter something and press return (ctrl-d to exit):\n";
while (<$slave>) {
print $slave "you entered: $_";
Jump to Line
Something went wrong with that request. Please try again.