}
global_handle = &handle;
global_profile = profile;
- esl_thread_create_detached(msg_thread_run, &handle);
+
+ if (esl_thread_create_detached(msg_thread_run, &handle) != ESL_SUCCESS) {
+ printf("Error starting thread!\n");
+ esl_disconnect(&handle);
+ return 0;
+ }
#ifdef HAVE_EDITLINE
el = el_init(__FILE__, stdin, stdout, stderr);
#endif
};
-size_t thread_default_stacksize = 240;
+size_t thread_default_stacksize = 240 * 1024;
void esl_thread_override_default_stacksize(size_t size)
{
status = ESL_SUCCESS;
goto done;
+
failpthread:
+
pthread_attr_destroy(&thread->attribute);
#endif