Permalink
Browse files

Fix for issue 237 backported from master

  • Loading branch information...
1 parent 32241a0 commit f8fa3e283371f0709f22d73929c8ae57aa6b4d7d @antirez committed Sep 3, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 redis.c
View
@@ -8902,6 +8902,11 @@ static void vmInit(void) {
/* LZF requires a lot of stack */
pthread_attr_init(&server.io_threads_attr);
pthread_attr_getstacksize(&server.io_threads_attr, &stacksize);
+
+ /* Solaris may report a stacksize of 0, let's set it to 1 otherwise 115
+ * multiplying it by 2 in the while loop later will not really help ;) */
+ if (!stacksize) stacksize = 1;
+
while (stacksize < REDIS_THREAD_STACK_SIZE) stacksize *= 2;
pthread_attr_setstacksize(&server.io_threads_attr, stacksize);
/* Listen for events in the threaded I/O pipe */

0 comments on commit f8fa3e2

Please sign in to comment.