|
|
coherent
named pipe Definition named pipe
A _n_a_m_e_d _p_i_p_e is a special file created with the command
/eettcc/mmkknnoodd. Unlike the block- and character-special files created
by mmkknnoodd, a named pipe is not a device.
A named pipe acts like a conventional pipe set up between related
processes. It differs in that it has a visible name that can be
seen in a file system. It also differs in that it has
permissions (since it's a file and has a name) associated with it
just like any other file. This allows a named pipe to be
accessed by processes that are _n_o_t related to each other, and can
even be used for processes that are running on behalf of
difference users.
The following illustrates how one process can write data into a
named pipe and an unrelated process can read from it:
/etc/mknod my_pipe p # create the named pipe
chmod 644 my_pipe
ls -lR / > my_pipe & # pump data into pipe in background
mail fred < my_pipe # read from the pipe and process
This script creates a named pipe called mmyy_ppiippee and makes sure
that it is readable; it then pumps a mass of data into the pipe
(in the background), and then has a process read data from the
named pipe and perform some action on them (in this case, mail
the data to use ffrreedd). In this example, the mmaaiill process could
be running from some other login and could either be in the
foreground or background.
***** See Also *****
ddeeffiinniittiioonnss, mmkknnoodd, ppiippee
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.