--- rxvt-unicode/doc/rxvt.1.pod 2021/07/24 11:00:58 1.255 +++ rxvt-unicode/doc/rxvt.1.pod 2021/11/22 17:00:49 1.256 @@ -535,6 +535,23 @@ my $slave = $pty->slave; while (<$slave>) { print $slave "got <$_>\n" } +Note that, despite what the name might imply, the file descriptor does not +need to be a pty, it can be a bi-directional pipe as well (e.g. a unix +domain or tcp socket). While tty operations cannot be done in this case, +B<@@RXVT_NAME@@> can still be remote controlled with it: + + use Socket; + use Fcntl; + + socketpair my $URXVT, my $slave, Socket::AF_UNIX, Socket::SOCK_STREAM, Socket::PF_UNSPEC; + fcntl $slave, Fcntl::F_SETFD, 0; + system "exec @@RXVT_NAME|| -pty-fd " . (fileno $slave) . " &"; + close $slave; + + syswrite $URXVT, "Type a secret password: "; + my $secret = do { local $/ = "\r"; <$URXVT> }; + print "No so secret anymore: $secret\n"; + =item B<-pe> I Comma-separated list of perl extension scripts to use (or not to use) in