Hi,
 We are developing a multithreaded application
 which uses the following environment
   - Netscape LDAP SDK (version 3.1)
   - ACE
   - Red Hat Linux 6.1


   The threads  are daemon threads spawned
   at startup and killed when the application terminates.
    The number of  threads are configurable at start up.
   Every thread has its own LDAP*, so we are not
   using the thread callback functions provided by the SDK
  used in a situation where multiple threads share the same
  ldap session  .
  Every thread  initializes its LDAP* using the ldap_init
  call.  We are using the LDAP_OPT_RECONNECT
  to rebind to the server if it goes down.
  We are checking for the return value of  ldap_search_ext_s().
  If the return code is LDAP_SERVER_DOWN or
  LDAP_CONNECT_ERROR ,which indicates the server is
  down, we rebind to the server using the LDAP* obtained
  from the ldap_init call. If the bind succeeds we fire the search again.

  In order to simulate a case in which the server goes down, while
  performng a search and comes up again, we manually shutdown
  the Netscape directory server, while the application fired searches on it.
  In some situations we encountered a  broken pipe error
  (due to SIGPIPE signal) which caused the application to exit.
  We observed the same problem even when the application
 has just a single thread running.

Has anyone encountered  the SIGPIPE signal with the
LDAP_OPT_RECONNECT option?
Should we write a signal handler to catch the signal?







Reply via email to