[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#3524) libldap multiple select() without reinitializing FD_SETs



At 03:56 AM 1/28/2005, rhafer@suse.de wrote:
>Full_Name: Ralf Haferkamp
>Version: 2.2.23
>OS: Linux (Kernel 2.6)
>URL: ftp://ftp.openldap.org/incoming/
>Submission from: (NULL) (212.95.100.148)
>
>
>According to the select(2) man page

Is there any other reason for this change?  Especially as it
applies to the timeout?

On some systems, when EINTR is returned, the timeout is
decreased by the waited time.  Otherwise, the amount of
time waited across the original and all restarts could be much
then the specified timeout.

Kurt

>the FD_SETs and timeout struct becomes
>undefined after select returned with an error. In libldap (e.g. in wait4msg()
>and ldap_pvt_connect()) it seems possible that select is called more than once
>without reinitializing the FD_SETs and the timeout struct. (Only if
>LDAP_OPT_RESTART is set).