3 # sample script to illustrate the -pty-fd option
9 fcntl $pty, F_SETFD, 0; # clear close-on-exec
11 system "rxvt -pty-fd " . (fileno $pty) . "&";
14 # now communicate with rxvt
15 my $slave = $pty->slave;
17 print $slave "hi! please enter something and press return (ctrl-d to exit):\n";
20 print $slave "you entered: $_";