[Date Prev][Date Next]
ldap_result(), Posix signals and error checking
- To: email@example.com
- Subject: ldap_result(), Posix signals and error checking
- From: John Miller <firstname.lastname@example.org>
- Date: Sat, 5 Sep 2009 17:58:09 +0200
- Content-disposition: inline
- User-agent: KMail/1.11.4 (Linux/18.104.22.168-0.1-pae; KDE/4.2.4; i686; ; )
I have noticed a problem with my program (which is supposed to generate and
receive many Posix signals ) and the function ldap_result(). It happened to both
my code and those library functions that used it (the synchronous versions of
various add/search/modify functions).
They all failed randomly with a "Can't contact LDAP server" error. I tracked the issue
down to the poll() function in os-ip.c : it's return value is not checked to see if
it has been interrupted by a signal. Patching the library ( making the poll function
to restart if errno == EINTR after failure ), resolved my problem.
Is it a bug or a choice? The patch is trivial, but if that error is not checked by choice that
should be documented imho.