reptyr
is a super useful tool written by Nelson Elhage that can be use to move a running process to another TTY session (e.g., moving a process started in the shell to a screen
session).
Reptyr currently has support for Linux and FreeBSD using ptrace
. macOS, however, lacks a complete ptrace
implementation, so does not work with the existing implementation.
I started writing macOS platform support for reptyr based on the FreeBSD code, but implementing it with the needed calls in Mach.
Having an interest in Rust, I stopped working on the macOS support, and instead decided I would port it to Rust and then add macOS support.
Some very early code for macOS support is available here: mf-macos_support
Work on the Rust port is happening here: mf-rust_port