How to make perl script start tmux child process with a few (2) tmux panes seen by the script as (write only) file descriptors?
#!/usr/bin/perl
sub get_handles {
# some tmux magic
return @handles; # return array of two file descriptors, preferably IO::Handle
}
I need it for script using AnyEvent module (or threads).
https://github.com/tmux/tmux/issues/567 gives exaple how to get list of pseudo terminal devices (file paths).
tmux list-panes -F'#{pane_tty} #{pane_id}'