Fix thread init bug introduced

This commit is contained in:
z3APA3A 2016-02-19 20:21:16 +03:00
parent b40e8fae4c
commit ad9b0046d9
2 changed files with 6 additions and 4 deletions

View File

@ -61,7 +61,7 @@ struct extparam conf = {
#ifdef __FreeBSD__ #ifdef __FreeBSD__
16384, 16384,
#else #else
0 0,
#endif #endif
0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 500, 0, 0, 0,
6, 600, 6, 600,

View File

@ -401,9 +401,6 @@ int MODULEMAINFUNC (int argc, char** argv){
return((*srv.pf)((void *)newparam)? 1:0); return((*srv.pf)((void *)newparam)? 1:0);
} }
pthread_attr_init(&pa);
pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + (8192 + srv.stacksize));
pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED);
#endif #endif
@ -509,6 +506,11 @@ int MODULEMAINFUNC (int argc, char** argv){
srv.fds.fd = sock; srv.fds.fd = sock;
srv.fds.events = POLLIN; srv.fds.events = POLLIN;
#ifndef _WIN32
pthread_attr_init(&pa);
pthread_attr_setstacksize(&pa,PTHREAD_STACK_MIN + (8192 + srv.stacksize));
pthread_attr_setdetachstate(&pa,PTHREAD_CREATE_DETACHED);
#endif
for (;;) { for (;;) {
for(;;){ for(;;){