[MPlayer-dev-eng] Re: [PATCH] Fix some seek failure

Rich Felker dalias at aerifal.cx
Sat Mar 18 06:33:14 CET 2006


On Fri, Mar 17, 2006 at 12:25:04PM +0200, Ivan Kalvachev wrote:
> > This has nothing to do with the cache or ftp in particular. When
> > reading from a network socket it can happend quiet often that read
> > return less data than requested. Nothing special there, the same is true
> > when reading from pipe or any kind of unix file/device for that matter.
> 
> Reading from pipe would block if there is not enough data. However

No, this is not how unix io semantics work. read will always return
immediately if there is any data available, possibly reading less than
the requested amount. Blocking only occurs if there is no data at all
available.

Rich




More information about the MPlayer-dev-eng mailing list