named pipes
Kevin O'Gorman
kevin at kosman.UUCP
Fri Apr 15 06:39:19 AEST 1988
In article <339 at bacchus> darren at bacchus (Darren Friedlein) writes:
>
>OK - Is there anyone out there that can explain to me how named pipes work
>(specifically on the UNIXpc)? I understand the concept, but I don't know
>how to implement them. I believe /dev/lp is one, but I'm not sure. Does
>each one require a device driver? Does the fact that I use the pty package
>make things any easier?
The only named pipe in the standard UNIX PC stuff is /usr/spool/lp/FIFO, which
I have guessed (but don't know) is how 'lp' tells the scheduler there's stuff
to print. This exists only when the lp scheduler is running, or has crashed.
I found this out doing backups, because cpio would choke on a named pipe in
the file system. There's not much documentation on these beasts, but there
was a posting a long time ago called '2-d pipes' which used these things to
create a more complicated pipeline structure than the straight line usually
used.
The idea is to make a directory entry with mknod(2), and then have two
processes open it, one for reading and one for writing. They are now connected
by a pipe, just like the one you get from the pipe(2) call. They are useful
primarily when the name of the pipe is agreed by convention (as is the case
with /usr/spool/lp/FIFO).
More information about the Unix-pc.general
mailing list