Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / man / man1 / dislocate.1
CommitLineData
920dae64
AT
1.TH DISLOCATE 1 "7 October 1993"
2.SH NAME
3Dislocate \- disconnect and reconnect processes
4.SH SYNOPSIS
5.B dislocate
6[
7.I program args...
8]
9.SH INTRODUCTION
10.B Dislocate
11allows processes to be disconnected and reconnected to the terminal.
12Possible uses:
13.RS
14.TP 4
15\(bu
16You can disconnect a process from a terminal at work
17and reconnect from home, to continue working.
18.TP 4
19\(bu
20After having your line be dropped due to noise, you can get back to your
21process without having to restart it from scratch.
22.TP 4
23\(bu
24If you have a problem that you would like to show someone, you can set
25up the scenario at your own terminal, disconnect, walk down the hall,
26and reconnect on another terminal.
27.TP 4
28\(bu
29If you are in the middle of a great game (or whatever) that does not allow
30you to save, and someone else kicks you off the terminal, you can disconnect,
31and reconnect later.
32.SH USAGE
33When run with no arguments,
34.B Dislocate
35tells you about your disconnected processes and lets you reconnect to one.
36Otherwise,
37.B Dislocate
38runs the named program along with any arguments.
39
40By default, ^] is an escape that lets you talk to
41.B Dislocate
42itself. At that point, you can disconnect (by pressing ^D) or
43suspend
44.B Dislocate
45(by pressing ^Z).
46
47Any Tcl or Expect command is also acceptable at this point.
48For example,
49to insert the contents of a the file /etc/motd as if you had typed it, say:
50.nf
51
52 send -i $out [exec cat /etc/motd]
53
54.fi
55
56To send the numbers 1 to 100 in response to the prompt "next #", say:
57.nf
58
59 for {set i 0} {$i<100} {incr i} {
60 expect -i $in "next #"
61 send -i $out "$i\\r"
62 }
63.fi
64
65Scripts can also be prepared and sourced in so that you don't have to
66type them on the spot.
67
68.B Dislocate
69is actually just a simple
70.B Expect
71script. Feel free to make it do what you want it to do or just
72use
73.B Expect
74directly, without going through
75.BR Dislocate .
76.B Dislocate
77understands a few special arguments. These should appear before any program
78name. Each should be separated by whitespace. If the arguments themselves
79takes arguments, these should also be separated by whitespace.
80.PP
81The
82.B \-escape
83flag sets the escape to whatever follows. The default escape is ^].
84.PP
85.SH CAVEATS
86This program was written by the author as an exercise to show that
87communicating with disconnected processes is easy. There are
88many features that could be added, but that is not the intent of this
89program.
90
91.SH SEE ALSO
92.BR Tcl (3),
93.BR libexpect (3)
94.br
95.I
96"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs"
97\fRby Don Libes,
98O'Reilly and Associates, January 1995.
99.SH AUTHOR
100Don Libes, National Institute of Standards and Technology