Sysv pipes/FIFO's & blocking

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Aug 28 17:54:43 AEST 1989


In article <9348 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
>What is supposed to happen under sysV if a pipe or FIFO contains
>3 characters and a read() requests 4 characters?

read() returns 3 characters in such a case.

>What about fread()?

fread() will loop until it acquires an entire bufferful of data (typically
512 or 1024 bytes), or EOF is detected (a 0 return from read()), or an I/O
error occurs (-1 return from read()).

>Is it documented anywhere?

Yes.



More information about the Comp.unix.questions mailing list