NAME
ikp_tee - icon processing system tee implementation
SYNOPSIS
ikp_tee [ -b bufsize ] [ -f [ -d tmpdir ] ]
DESCRIPTION
ikp_tee implements the tee processes of the ikp(1) icon pro-
cessing interface by reading input on file descriptor 0 and
copying it unchanged onto file descriptors 3 and 4. It
should only be invoked indirectly by ikp on behalf of the
user.
It normally works by reading its input one buffer at a time.
As each buffer is read, it is written first to one output
stream and then to the other. If either output stream blocks
for any reason, the entire tee will block. This scheme is
fairly efficient in terms of its minimal memory usage, but
may cause fatal deadlock in more complicated networks, par-
ticularly those which cause both output streams from a tee
to be later merged via a process such as ikp_cat(1). To
alleviate this problem, an alternative mode of operation
employing a temporary file and non-blocking I/O has been
provided. Note that this latter scheme cannot be used if
the tee is embedded in a process loop, since it attempts to
read all of its input and save it to a temporary file before
any output is written.
OPTIONS
-b bufsize
Perform all I/O with an internal buffer of bufsize.
(The default buffer size is 512.)
-f Use a temporary file and non-blocking I/O to implement
the tee instead of the default blocking I/O scheme.
-d tmpdir
Use tmpdir instead of /tmp to hold the temporary file
created by using the -f option.
BUGS
This utility should be rewritten with a single algorithm
which will work under all circumstances and not require the
user to decide which of the two current implementations will
work best in a particular context.
SEE ALSO
ikp(1)
AUTHOR
Roger Davis, October 1989.
COPYRIGHT
copyright 2001, Amoco Production Company
All Rights Reserved
an affiliate of BP America Inc.
Man(1) output converted with
man2html