]> git.saurik.com Git - redis.git/commitdiff
fix for issue 237
authorAnko painting <anko.com+github@gmail.com>
Fri, 3 Sep 2010 04:13:27 +0000 (21:13 -0700)
committerAnko painting <anko.com+github@gmail.com>
Fri, 3 Sep 2010 04:13:27 +0000 (21:13 -0700)
src/vm.c

index 50fb326dba12ce90dbe817adc5a3661f538807b7..635016b859a2096057bfb73b62e52c04b1d79afc 100644 (file)
--- a/src/vm.c
+++ b/src/vm.c
@@ -110,6 +110,9 @@ void vmInit(void) {
     /* LZF requires a lot of stack */
     pthread_attr_init(&server.io_threads_attr);
     pthread_attr_getstacksize(&server.io_threads_attr, &stacksize);
+    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 */