Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!apple!gem.mps.ohio-state.edu!swrinde!cs.utexas.edu!ut-emx!walt.cc.utexas.edu!jon From: jon@walt.cc.utexas.edu (Jon Boede) Newsgroups: comp.lang.c Subject: Does O_NDELAY shred read(2)? Keywords: O_NDELAY, read, pipes Message-ID: <20764@ut-emx.UUCP> Date: 10 Nov 89 19:52:50 GMT Sender: news@ut-emx.UUCP Reply-To: jon@walt.cc.utexas.edu (Jon Boede) Organization: The People's Republic of Austin, Texas Lines: 20 If I have two processes communicating through a named pipe, and if the process that is read(2)ing has O_NDELAY set on the file descriptor so that it will return if nothing is on the pipe... If a write(fd,buf,X) is made, will a read(fd2,buf2,X) == X? In other words, I know that the write will be atomic... will the read also be? Is there a certain buffer size past which I'll start running into trouble? I'm thinking of using a buffer that's about 2,000 bytes in length. Also, with a named pipe, how much (byte-wise) can be written before the writer will be suspended? Does setting O_NDELAY on the write end do anything? Thanks, Jon -- - - - - - - - - - - Jon Boede jon@bodedo.ucm.org 7117 Wood Hollow #726 ...!{uunet,texbell}!cs.utexas.edu!bodedo!jon Austin, TX 78731-2548 +1 512 346-3142 "People who are incapable of making decisions are the ones that hit those barrels at freeway exits"