[lug] Named pipe and network tool?

Chris Riddoch socket at peakpeak.com
Tue Jun 5 21:58:18 MDT 2001


"D. Stimits" <stimits at idcomm.com> writes:
>
> Chris Riddoch wrote:
> > pilot <-> pi-port <-network-> *** <-> named pipe <-> application (e.g. jpilot)
> 
> One question...do you already have the "application" part that can
> read/write from a named pipe?
> 

Yeah. Any program that reads and writes files doesn't care what *kind*
of file it is, in most cases, as long as it's a file that can be read
and written to.  (for the most part) Even 'cat' could do it.  It's The
Unix Way(TM).  /dev/hda can be treated like a file, though you might
not *want* to, you *could* use "grep" on /dev/hda.  (Naturally, there
are usually better ways to handle certain tasks.  But it's possible!)

To use a named pipe, you create it with mkfifo.  And then you write to
it.  And then you read from it.  Except it's not really a file, it's
just a little data sink, a form of IPC - Inter-Process Communication.

Maybe someone else could explain it better. Particularly the part
about how it's not really a file.  Hmmm.

--
Chris Riddoch         |  epistemological
socket at peakpeak.com   |  humility



More information about the LUG mailing list