diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-12 14:39:07 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-12 14:39:07 +0000 |
commit | cb96c0dcc28bc37db1a90d3523ff9c2fe6c41047 (patch) | |
tree | c743b263c59220c1e02d792b321fd8ffa315955a /src | |
parent | b39459ae52a6195d2601c3a6dac7bed1265fb793 (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
Diffstat (limited to 'src')
-rw-r--r-- | src/htsthread.c | 8 |
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 { |