Named pipes?

thomas.e.lowe tel at cbnewsh.ATT.COM
Fri Apr 21 10:35:04 AEST 1989


In article <2491 at mentor.cc.purdue.edu> yuf at mentor.cc.purdue.edu (Kyle Grieser) writes:
>In article <5367 at cs.Buffalo.EDU> ugkamins at sunybcs.UUCP (John Kaminski) writes:
>>In article <704 at sdrc.UUCP> scwilk at sdrc.UUCP (Ken_Wilkinson) writes:
>>>
>>>     I am to impliment IPC's for a product.  However, message queues
>>> "may" not do the job for me.  It was mentioned that "named pipes"
>>> could be a solution.  Does anyone have a suggestion for sources
>>> which would document named pipes? Also sample code fragments would
>>> be helpful too. 
>>
>>Most of the docs I can find on named pipes are in mknod(2).
>
>Readers will block if there is nothing to read, and
>writers will block if there is no one reading from the other end.
>

Actually, it depends upon how one opens the named pipe.  With O_NDELAY
set, readers and writers will NOT necessarily block.  

The best source for information about named pipes I found was in the man pages
under the open, read, write, and mknod system calls.  They all refer to
named pipes as 'FIFOS' and talk about the behavior of the particular
system call when used on the FIFOS, depending upon wether or not O_NDELAY
is set, as well as other things.

You will use mknod to create the named pipe if it doesn't already exist.  
The mknod command wouln't allow you to make pipes.

Good luck!
-- 
Tom Lowe    tel at hound.ATT.COM or  att!hound!tel     201-949-0428
AT&T Bell Laboratories, Room 2E-637A
Crawfords Corner Road,  Holmdel, NJ  07733
(R) UNIX is a registered trademark of AT&T  (keep them lawyers happy!!)



More information about the Comp.unix.wizards mailing list