COHERENT manpages

This page displays the COHERENT manpage for named pipe [Definition].

List of available manpages
Index


named pipe -- Definition

A named pipe is a special  file created with the command /etc/mknod. Unlike
the block-  and character-special files  created by mknod, 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 not related to each other,
and can even be used for  processes that are running on behalf of different
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 my_pipe and  makes sure that it is
readable; it then  pumps a mass of data into  the pipe (in the background),
and finally  has a process read  data from the named  pipe and perform some
action  on them  (in  this case,  mail  the data  to user  fred).  In  this
example, the  mail process  could be running  from another login  and could
either be in the foreground or background.

See Also

libsocket,
mkfifo(),
mknod,
pipe,
Using COHERENT
POSIX Standard, §5.4.2