X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-pdu-assoc-thread.cpp;h=01078d57823cf632b87bf6b1f9194a391215c511;hb=50f38dcd58cdf62b3380710bdd7f23d6f88c555c;hp=5f7a20ec5539c254f7a611c09e3c46f1639e1117;hpb=bd71f8812ca0f38438733efc89ecce1f49dae9e7;p=yazpp-moved-to-github.git diff --git a/src/yaz-pdu-assoc-thread.cpp b/src/yaz-pdu-assoc-thread.cpp index 5f7a20e..01078d5 100644 --- a/src/yaz-pdu-assoc-thread.cpp +++ b/src/yaz-pdu-assoc-thread.cpp @@ -3,22 +3,29 @@ * See the file LICENSE for details. * * $Log: yaz-pdu-assoc-thread.cpp,v $ - * Revision 1.1 2001-03-26 14:43:49 adam + * Revision 1.2 2001-03-27 14:47:45 adam + * New server facility scheme. + * + * Revision 1.1 2001/03/26 14:43:49 adam * New threaded PDU association. * */ +#ifdef WIN32 +#include +#else +#include +#include +#endif + + +#include #include #include #include #include -#ifdef WIN32 -#include -#else -#include -#endif Yaz_PDU_AssocThread::Yaz_PDU_AssocThread( @@ -64,9 +71,12 @@ void Yaz_PDU_AssocThread::childNotify(COMSTACK cs) exit (1); } #else - pthread_t type; + pthread_t tid; - int id = pthread_create (&type, 0, events, socket_observable); - yaz_log (LOG_LOG, "pthread_create returned id=%d", id); + int id = pthread_create (&tid, 0, events, socket_observable); + if (id) + yaz_log (LOG_ERRNO|LOG_FATAL, "pthread_create returned id=%d", id); + else + pthread_detach (tid); #endif }