summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-05-12 14:39:07 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-05-12 14:39:07 +0000
commitcb96c0dcc28bc37db1a90d3523ff9c2fe6c41047 (patch)
treec743b263c59220c1e02d792b321fd8ffa315955a
parentb39459ae52a6195d2601c3a6dac7bed1265fb793 (diff)
webhttrack: use 8MB for the stack size (needed especially for OSX).
should get rid of http://code.google.com/p/httrack/issues/detail?id=10
-rw-r--r--src/htsthread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/htsthread.c b/src/htsthread.c
index 35744de..6e6a805 100644
--- a/src/htsthread.c
+++ b/src/htsthread.c
@@ -142,9 +142,13 @@ HTSEXT_API int hts_newthread( void (*fun)(void *arg), void *arg)
}
#else
{
+ const size_t stackSize = 1024*1024*8;
+ pthread_attr_t attr;
pthread_t handle = 0;
- int retcode = pthread_create(&handle, NULL, hts_entry_point, s_args);
- if (retcode != 0) { /* error */
+ int retcode;
+ if (pthread_attr_init(&attr) != 0
+ || pthread_attr_setstacksize(&attr, stackSize) != 0
+ || (retcode = pthread_create(&handle, &attr, hts_entry_point, s_args)) != 0) {
free(s_args);
return -1;
} else {