· @aluaces
31 followers · 114 posts · Server fosstodon.org

I recently learned about , which allows you to reattach a running process to a different terminal, for example a one, in case you have to close or exit the current session.

#reptyr #tmux

Last updated 2 years ago

Tzafrir · @tzafrir
119 followers · 3071 posts · Server tooot.im

what do you do if you opened a file in vim in a different terminal?

reptyr PID_OF_VIM

(you can find the PID in the message that vim gives you)

But in more recent systems this may fail. The reason is limitations on ptrace.

So a potential workaround is to temporarily remove this limitation:

sudo sysctl kernel.yama.ptrace_scope=0
reptyr PID_OF_VIM
sudo sysctl kernel.yama.ptrace_scope=1

#reptyr #ptrace #sysctl

Last updated 6 years ago