Timeouts in HEAD ldap code.

Jeremy Allison jra at samba.org
Wed Jun 1 15:47:15 GMT 2005

On Wed, Jun 01, 2005 at 11:07:16AM +0200, 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:

Nope - is a signal is pending or arrives after read have been entered then
it can abort with EINTR. sys_read() explicitly catches and restarts the read()

>     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?

Yes, if a signal arrives between the select() and entering the read().


More information about the samba-technical mailing list