I use tmux via ssh on a shared machine and do all my work on one single tmux session. However, the shared machine has a per-process time limit policy and will kill processes if the time limit is exceeded. The tmux server don't take much CPU time, but after about one month it reaches the limit and the process is killed (also killing all the subprocesses I launched).

Knowing this, I can keep an eye on the process time and start another server before the limit is reached. But I was wondering if there was a way to change the "ownership" of an already running process ("reparent" a process to the new server instance).

1 Answer 1


There is no portable way to do this. There is a program https://github.com/nelhage/reptyr that can do this on Linux (it uses ptrace and interposes all the system calls), but I don't know how reliable it is or if it is still maintained. YMMV.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .