Added manpage for blindtty (by Christoph Berg from Debian)
[retty.git] / retty.1
blob9559ab6641ce213d5e27cb1d2b6e5102556605a2
1 .TH RETTY 1 2006-08-14
3 .SH NAME
4 retty - Attach process running on another terminal
6 .SH SYNOPSIS
7 .B retty [-v] [-h] [-0 fd] [-1 fd] [-2 fd] PID
9 .SH DESCRIPTION
11 .B retty
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.
16 Non-violently killing
17 .B retty
18 should provide for a proper detach - after that,
19 the process can be used on the original terminal again. Multiple subsequent
20 .B retty
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
29 preceded by an enter.
31 By default,
32 .B retty
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
36 .B retty
37 to attach correct file descriptors instead. OpenSSH is one such program - it 
38 duplicates file descriptors and then uses duplicated ones. 
40 .RE
41 .SH OPTIONS
42 .TP
43 .B "\-v"
44 Display version information.
45 .TP
46 .B "\-h"
47 Display usage information.
48 .TP
49 .B "\-0 fd"
50 Specify file descriptor that process we want to attach uses as input.
51 Default value is 0 (stdin).
52 .TP
53 .B "\-1 fd"
54 Specify file descriptor that process we want to attach uses as output.
55 Default value is 1 (stdout).
56 .TP
57 .B "\-2 fd"
58 Specify file descriptor that process we want to attach uses for error
59 outputs. Default value is 2 (stderr).
60 .TP
61 .B PID
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).
66 .RE
67 .SH BUGS
68 .PD
69 .IP \(bu
70 .I retty
71 is x86-specific and works only on Linux.
72 .IP \(bu
73 The attached process' controlling terminal is not switched appropriately,
74 which causes many funny effects (e.g.
75 .I mutt
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).
79 .IP \(bu
80 If you attach
81 .I bash
82 it imagines EOF on stdin. Attaching and detaching multiple times without
83 any activity in the meantime will cause it to die.
84 .IP \(bu
85 Attempts to attach
86 .I less
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).
90 .RE
91 .SH "SEE ALSO"
92 screen(1)