Timeouts in HEAD ldap code.
Michael Sweet
mike at easysw.com
Wed Jun 1 11:27:39 GMT 2005
Volker Lendecke wrote:
> On Tue, May 31, 2005 at 05:18:59PM -0700, Jeremy Allison wrote:
>
>>Now read_data_until() isn't quite right as it calls sys_read() which will
>>block indefinately as it ignores EINTR.
>
>
> You're sure? sys_read is only called if select indicated that something is
> readable. Reading http://www.opengroup.org/onlinepubs/007908799/xsh/read.html
> I get the impression that EINTR is only returned when there's no data
> available. In all other cases it should return the amount of data actually
> read:
>
> [EINTR]
> The read operation was terminated due to the receipt of a signal, and no
> data was transferred.
>
> Is read(2) still an interruptible system call when select has indicated
> readability?
read(2) is always interruptible, so it is possible to get EINTR
even after select(2) indicates that there is data available - EINTR
is returned when the process receives a signal while processing
the read(2) but before any data has been transferred.
--
______________________________________________________________________
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Publishing Software http://www.easysw.com
More information about the samba-technical
mailing list