1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
.TH RETTY 1 2006-08-14
.SH NAME
retty - Attach process running on another terminal
.SH SYNOPSIS
.B retty [-v] [-h] [-0 fd] [-1 fd] [-2 fd] PID
.SH DESCRIPTION
.B retty
is a simple tool which will let you attach 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.
Non-violently killing
.B retty
should provide for a proper detach - after that,
the process can be used on the original terminal again (multiple subsequent
.B retty
attachments of a single process are possible, but the process does I/O
only on the last one).
You can also use escape sequences to detach a process and possibly do other
things. The escape character is "`" (lowercase of "~") and "`h" will give you
list of possible escape sequences. The escape character must be immediately
preceded by an enter.
By default,
.B retty
attaches file descriptors 0, 1 and 2 of process. That should
be enough in most cases, but will not do in some special ones. In such case,
you have to check /proc/<PID>/fd and force
.B retty
to attach correct file
descriptors instead.
.RE
.SH OPTIONS
.TP
.B "\-v"
Display version information.
.TP
.B "\-h"
Display usage information.
.TP
.B "\-0 fd"
Specify file descriptor that process we want to attach uses as input.
Default value is 0 (stdin).
.TP
.B "\-1 fd"
Specify file descriptor that process we want to attach uses as output.
Default value is 1 (stdout).
.TP
.B "\-2 fd"
Specify file descriptor that process we want to attach uses for error
outputs. Default value is 2 (stderr).
.TP
.B PID
PID of process that we want to attach. If retty is run as ordinary user,
it can attach only processes owned by that user. If run as root, retty
can attach probably anything (not always good idea).
.RE
.SH BUGS
.PD
.IP \(bu
.I retty
is x86-specific and works only on Linux.
.IP \(bu
The attached process' controlling terminal is not switched appropriately,
which causes many funny effects (e.g.
.I mutt
not properly adjusting for your
window size, but this can be fixed by going into editor and back), annoying
bugs (ctrl+c not delivered properly) and totally breaking attaching for
some applications (OpenSSH).
.IP \(bu
If you attach
.I bash
it imagines EOF on stdin. Attaching and detaching multiple times without
any activity in the meantime will cause it to die.
.IP \(bu
Attempts to attach
.I less
just don't work even with input fd override. This might or might not be
fixed in the future, depending on cause (which is unknown now).
.RE
.SH "SEE ALSO"
screen(1)
|