4 retty - Attach process running on another terminal
7 .B retty [-v] [-h] [-0 fd] [-1 fd] [-2 fd] PID
12 is a simple tool which will let you attach process currently running on
13 another terminal. Unlike screen, you need to make no special provisions
14 in advance - just get the process' pid and attach it anytime.
18 should provide for a proper detach - after that,
19 the process can be used on the original terminal again. Multiple subsequent
21 attachments of a single process are possible, but the process does I/O
22 only on the last one - don't forget to detach them in the right sequence,
23 or your application will break (in this case, it is maybe better to attach
24 already running retty than attaching single application twice).
26 You can also use escape sequences to detach a process and possibly do other
27 things. The escape character is "`" (lowercase of "~") and "`h" will give you
28 list of possible escape sequences. The escape character must be immediately
33 attaches file descriptors 0, 1 and 2 of the process. That should be enough
34 in most cases, but will not do in some special ones. In such case, you have
35 to check /proc/<PID>/fd and force
37 to attach correct file descriptors instead. OpenSSH is one such program - it
38 duplicates file descriptors and then uses duplicated ones.
44 Display version information.
47 Display usage information.
50 Specify file descriptor that process we want to attach uses as input.
51 Default value is 0 (stdin).
54 Specify file descriptor that process we want to attach uses as output.
55 Default value is 1 (stdout).
58 Specify file descriptor that process we want to attach uses for error
59 outputs. Default value is 2 (stderr).
62 PID of process that we want to attach. If retty is run as ordinary user,
63 it can attach only processes owned by that user. If run as root, retty
64 can attach probably anything (not always good idea).
71 is x86-specific and works only on Linux.
73 The attached process' controlling terminal is not switched appropriately,
74 which causes many funny effects (e.g.
76 not properly adjusting for your
77 window size, but this can be fixed by going into editor and back) and annoying
78 bugs (ctrl+c not delivered properly).
82 it imagines EOF on stdin. Attaching and detaching multiple times without
83 any activity in the meantime will cause it to die.
87 just don't work even with input fd override. This might or might not be
88 fixed in the future, depending on cause (which is unknown now).