-const char jcc_rcs[] = "$Id: jcc.c,v 1.465 2017/06/26 12:14:25 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.466 2017/06/26 12:17:57 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
jb_socket bfds[MAX_LISTENING_SOCKETS];
struct configuration_spec *config;
unsigned int active_threads = 0;
+#if defined(FEATURE_PTHREAD)
+ pthread_attr_t attrs;
+
+ pthread_attr_init(&attrs);
+ pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
+#endif
config = load_config();
#define SELECTED_ONE_OPTION
{
pthread_t the_thread;
- pthread_attr_t attrs;
- pthread_attr_init(&attrs);
- pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
errno = pthread_create(&the_thread, &attrs,
(void * (*)(void *))serve, csp);
child_id = errno ? -1 : 0;
- pthread_attr_destroy(&attrs);
}
#endif
}
}
+#if defined(FEATURE_PTHREAD)
+ pthread_attr_destroy(&attrs);
+#endif
+
/* NOTREACHED unless FEATURE_GRACEFUL_TERMINATION is defined */
/* Clean up. Aim: free all memory (no leaks) */