From c0b89ac5bfb90835ef01573267020e42d4fe070c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 23 Aug 2015 12:17:05 +0200 Subject: Imported Upstream version 1.8.0 --- numlib/ui.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) mode change 100644 => 100755 numlib/ui.c (limited to 'numlib/ui.c') diff --git a/numlib/ui.c b/numlib/ui.c old mode 100644 new mode 100755 index fefdcc2..31fd3b6 --- a/numlib/ui.c +++ b/numlib/ui.c @@ -119,13 +119,21 @@ int main(int argc, char ** argv) { /* Call the real main() in another thread */ int rv; + pthread_attr_t stackSzAtrbt; pthread_t thid; g_argc = argc; g_argv = argv; ui_initialized = 1; - if ((rv = pthread_create(&thid, NULL, callMain, (void *)NULL)) != 0) { + /* Default stack size is 512K - this is a bit small - raise it */ + if ((rv = pthread_attr_init(&stackSzAtrbt)) != 0 + || (rv = pthread_attr_setstacksize(&stackSzAtrbt, 4 * 1024 * 1024)) != 0) { + fprintf(stderr,"ui: thread_attr_setstacksize failed with %d\n",rv); + return -1; + } + + if ((rv = pthread_create(&thid, &stackSzAtrbt, callMain, (void *)NULL)) != 0) { fprintf(stderr,"ui: pthread_create failed with %d\n",rv); return -1; } -- cgit v1.2.3