--- rxvt-unicode/doc/pty-fd 2005/02/17 15:07:48 1.1 +++ rxvt-unicode/doc/pty-fd 2005/02/17 15:19:03 1.3 @@ -1,5 +1,7 @@ #!/usr/bin/perl +# sample script to illustrate the -pty-fd option + use IO::Pty; use Fcntl; @@ -7,6 +9,7 @@ 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;