Patch is attached.

Probably related, I can not run index with more than 1 thread.  I
am going to increase thread stack sizes in index and see if that
helps.

John Capo

--- ../../orig-aspseek-1.2.4a/src/daemon.cpp    Tue Jul  3 12:38:01 2001
+++ daemon.cpp  Tue Jul 24 10:29:46 2001
@@ -1003,11 +1003,15 @@
                // No theads are available in the linked list
                if (m_threads < m_maxThreads)
                {
+                       pthread_attr_t attr;
+                       pthread_attr_init(&attr);
+                       pthread_attr_setstacksize(&attr, 128000);
+
                        // Thread count has not reached maximal value, create new one
                        thread = new CWorkerThread;
                        thread->m_database = database;
                        thread->m_parent = this;
-                       pthread_create(&thread->m_thread, 0, processReqs, thread);
+                       pthread_create(&thread->m_thread, &attr, processReqs, thread);
                        m_threads++;
                }
                else
@@ -1029,9 +1033,13 @@
 
 void cmd(CSQLDatabase& database, int csock)
 {
+       pthread_attr_t attr;
+       pthread_attr_init(&attr);
+       pthread_attr_setstacksize(&attr, 128000);
+
        CSearchContext* ctx = new CSearchContext(&database, csock);
        pthread_t thr_id;
-       pthread_create(&thr_id, NULL, processReq, ctx);
+       pthread_create(&thr_id, &attr, processReq, ctx);
 }
 
 // Main function of daemon

Reply via email to