2

I've got reptyr to "open a new pty" by doing:

reptyr -L 7969

where 7969 is the PID of rabbitmq-server. The output of reptyr is

Opened a new pty: /dev/pts/25

but how do I attach tmux to that pty?

Thanks in advance :)

1

I may misunderstand what you are trying to do but if your aim is to move the process with PID 7969 into tmux then you can achieve it by running reptyr inside tmux:

$ tmux send-key -t mysession:mywindow "reptyr 7969^M"

That runs reptyr INSIDE the tmux session in the shell window at mysession:mywindow. If you need to create the session first:

$ tmux new -d -s mysession -n mywindow
$ tmux send-key -t mysession:mywindow "reptyr 7969^M"

To get ^M, press CONTROL_V and hit ENTER.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.