cvs: /php4/sapi/roxen phpmod.pike
| From: | David Hedbor | Date: | Wed, 24 Nov 1999 02:35:20 +0000 |
| Subject: | cvs: /php4/sapi/roxen phpmod.pike | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6812@lists.php.net to get a copy of this message | ||
neotron Tue Nov 23 21:35:20 1999 EDT
Modified files:
/php4/sapi/roxen phpmod.pike
Log:
Don't create a new thread for each php-script - use the handler thread.
Index: php4/sapi/roxen/phpmod.pike
diff -u php4/sapi/roxen/phpmod.pike:1.1 php4/sapi/roxen/phpmod.pike:1.2
--- php4/sapi/roxen/phpmod.pike:1.1 Tue Nov 23 18:08:10 1999
+++ php4/sapi/roxen/phpmod.pike Tue Nov 23 21:34:50 1999
@@ -1,11 +1,11 @@
-/* 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 <roxen.h>
#include <module.h>
inherit "module";
inherit "roxenlib";
-constant cvs_version = "$Id: phpmod.pike,v 1.1 1999/11/23 23:08:10 neotron Exp $";
+constant cvs_version = "$Id: phpmod.pike,v 1.2 1999/11/24 02:34:50 neotron Exp $";
constant thread_safe = 1;
string trim( string what )
@@ -16,9 +16,10 @@
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 @@
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();
}