Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!cbmvax!amix!blekko!skrenta From: skrenta@blekko.UUCP (Rich Skrenta) Newsgroups: comp.lang.c Subject: Re: Does O_NDELAY shred read(2)? Message-ID: <101@blekko.UUCP> Date: 11 Nov 89 17:06:21 GMT References: <20764@ut-emx.UUCP> Organization: BlekkoTek World Headquarters, Frazer, PA, USA Lines: 15 In article <20764@ut-emx.UUCP> jon@walt.cc.utexas.edu (Jon Boede) writes: > > If a write(fd,buf,X) is made, will a read(fd2,buf2,X) == X? An instructor at Usenix in Baltimore said that as long as you write less bytes than the total size of the buffer, your writes won't be split. Someone else told me that the buffer size is guaranteed to be a multiple of 2. If your writes are fixed size and also a multiple of 2, the buffer will fill up exactly on its boundary, and no writes will be split. These both seem reasonable; the second is safer, but a hassle if it's not necessary. Rich