From: David Hedbor Date: Wed, 24 Nov 1999 02:34:50 +0000 (+0000) Subject: Don't create a new thread for each php-script - use the handler thread. X-Git-Tag: PRE_RETURN_REF_PATCH~274 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6262280ad4a15fa28f94cb29a583d2b1ba52aef0;p=php Don't create a new thread for each php-script - use the handler thread. --- diff --git a/sapi/roxen/phpmod.pike b/sapi/roxen/phpmod.pike index 45341c34d0..1213e7f558 100644 --- a/sapi/roxen/phpmod.pike +++ b/sapi/roxen/phpmod.pike @@ -1,4 +1,4 @@ -/* Roxen PHP module based of the Roxen PHP module for Roxen 1.4. */ +/* Roxen PHP module based of the Roxen CGI module for Roxen 1.4. */ #include #include @@ -16,9 +16,10 @@ string trim( string what ) what = reverse(what); return what; } + //#define PHP_DEBUG #ifdef PHP_DEBUG -#define DWERROR(X) report_debug(X) +#define DWERROR(X) report_debug("Thr("+getpid()+"): "+X) #else /* !PHP_DEBUG */ #define DWERROR(X) #endif /* PHP_DEBUG */ @@ -157,7 +158,7 @@ class PHPScript mapping options = ([ "env":environment, ]); - thread_create(interpretor->run, command, options, this_object(), done); + interpretor->run(command, options, this_object(), done); mid->my_fd->set_close_callback(done); return this_object(); }