Re: select system call behavior
- From: "David Schwartz" <davids@xxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 13:52:18 -0800
"param" <sparameswara@xxxxxxxxx> wrote in message
news:1138724285.425955.44580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> In my program, every time writing into a FIFO, i made a check to see
> writev system call will block or not using "select system call". But
> select system call did not return positive value (positive value means
> no. of descriptors available to write, in my case 1) even when writev
> will able to write into FIFO (that means FIFO (buffer) is not full).
> Here i used 5 seconds as a time out period. So every time select system
> call is timed out.
To prevent the sender from dribbling if the reader is slow, most
operating systems will not unblock a 'select' waiter unless there is enough
room for the largest write to the pipe that the platform guarantees can be
completed atomically. When you call 'select', the OS has no idea that you
are only planning to write one byte and may wait until more space is
available.
DS
.
- References:
- select system call behavior
- From: param
- select system call behavior
- Prev by Date: Re: O_DIRECT Inside Kernel Module?
- Previous by thread: select system call behavior
- Index(es):