Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!uwvax!rutgers!att!cbnewsh!tel From: tel@cbnewsh.ATT.COM (thomas.e.lowe) Newsgroups: comp.unix.wizards Subject: Re: Named pipes? Keywords: interprocess communication Message-ID: <222@cbnewsh.ATT.COM> Date: 21 Apr 89 00:35:04 GMT References: <704@sdrc.UUCP> <5367@cs.Buffalo.EDU> <2491@mentor.cc.purdue.edu> Reply-To: tel@cbnewsh.ATT.COM (thomas.e.lowe) Organization: AT&T Bell Laboratories Lines: 34 In article <2491@mentor.cc.purdue.edu> yuf@mentor.cc.purdue.edu (Kyle Grieser) writes: >In article <5367@cs.Buffalo.EDU> ugkamins@sunybcs.UUCP (John Kaminski) writes: >>In article <704@sdrc.UUCP> scwilk@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@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!!)