* enough that we can read the whole thing without worrying too much about
* the overhead.
*/
+#ifdef NO_THREADS
+#define HARD_SERVER_LIMIT 256
+#endif
#ifndef HARD_SERVER_LIMIT
#define HARD_SERVER_LIMIT 8
#endif
* enough that we can read the whole thing without worrying too much about
* the overhead.
*/
+#ifdef NO_THREADS
+#define HARD_THREAD_LIMIT 1
+#endif
#ifndef HARD_THREAD_LIMIT
#define HARD_THREAD_LIMIT 64
#endif
+#ifdef NO_THREADS
+#define DEFAULT_THREADS_PER_CHILD 1
+#endif
#ifndef DEFAULT_THREADS_PER_CHILD
#define DEFAULT_THREADS_PER_CHILD 50
#endif
/* We are creating threads right now */
(void) ap_update_child_status(my_child_num, i, SERVER_STARTING,
(request_rec *) NULL);
+#ifndef NO_THREADS
if (pthread_create(&thread, &thread_attr, worker_thread, my_info)) {
ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
"pthread_create: unable to create worker thread");
sleep(10);
clean_child_exit(APEXIT_CHILDFATAL);
}
+#else
+ worker_thread(my_info);
+ /* The SIGTERM shouldn't let us reach this point, but just in case... */
+ clean_child_exit(APEXIT_OK);
+#endif
/* We let each thread update it's own scoreboard entry. This is done
* because it let's us deal with tid better.
RAISE_SIGSTOP(MAKE_CHILD);
- /* XXX - For an unthreaded server, a signal handler will be necessary
signal(SIGTERM, just_die);
- */
child_main(slot);
return 0;