A simple tool to attach to processes running on another terminal.
retty is a simple tool which will let you attach to a process currently running on another terminal. Unlike screen, you need to make no special provisions in advance - just get the process' pid and attach it anytime.
- Attach to any running process by PID
- No advance preparation needed (unlike screen/tmux)
- Escape sequences for detaching
- Support for custom file descriptors
makeretty [-v] [-h] [-0 fd] [-1 fd] [-2 fd] PID-v: Display version information-h: Display usage information-0 fd: Specify file descriptor for input (default: 0)-1 fd: Specify file descriptor for output (default: 1)-2 fd: Specify file descriptor for error output (default: 2)PID: Process ID to attach to
# Attach to process with PID 1234
retty 1234
# Attach to SSH process (which uses different file descriptors)
retty -0 4 -1 4 -2 4 1234Use escape sequences to detach:
- Enter +
`+hfor help - Enter +
`+dto detach
- x86-specific and works only on Linux with executable stack
- Some applications may not work if they do I/O on /dev/tty
- Controlling terminal is not switched appropriately
- Must run with same uid as target process
retty: Main attachment toolblindtty: Tool for running processes detached for later attachment
Written and maintained by Petr Baudis pasky@ucw.cz and Jan Sembera fis@bofh.cz.
blindtty(1),screen(1)