File: recordio.1

package info (click to toggle)
ucspi-tcp 0.84-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 908 kB
  • ctags: 522
  • sloc: ansic: 4,272; makefile: 764; sh: 289
file content (75 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (3)
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
.TH recordio 1
.SH NAME
recordio \- record the input and output of a program
.SH SYNTAX
.B recordio
.I program
[
.I arg ...
]
.SH DESCRIPTION
.B recordio
runs
.I program
with the given arguments.
It prints lines to stderr
showing the input and output of
.IR program .

At the beginning of each line on stderr,
.B recordio
inserts the
.I program
process ID,
along with
.B <
for input or
.B >
for output.
At the end of each line it inserts a space, a plus sign, or [EOF];
a space indicates that there was a newline in the input or output,
and [EOF] indicates the end of input or output.

.B recordio
prints every packet of input and output immediately.
It does not attempt to combine packets into coherent stderr lines.
For example,

.EX
     recordio sh -c 'cat /dev/fd/8 2>&1' > /dev/null
.EE

could produce

.EX
     5135 > cat: /dev/fd/8: Bad file descriptor 
.br
     5135 > [EOF]
.EE

or

.EX
     5135 > cat: +
.br
     5135 > /dev/fd/8+
.br
     5135 > : +
.br
     5135 > Bad file descriptor 
.br
     5135 > [EOF]
.EE

.B recordio
uses several lines for long packets
to guarantee that each line is printed atomically to stderr.

.B recordio
runs as a child of
.IR program .
It exits when it sees the end of
.IR program 's
output.
.SH "SEE ALSO"
tcpserver(1)