Date: 05/31/98
- Next message: Shane Caraveo: "[PHP-DEV] isapi status"
- Previous message: rasmus: "[PHP-DEV] CVS update: php31/ext/standard"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/main"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sunday May 31, 1998 @ 10:57
Author: shane
Update of /repository/php31/main
In directory asf:/tmp/cvs-serv24384/main
Modified Files:
debugger.c main.c
Log Message:
move debugger fix to 3.1. Deal with uninitialized threads. Other minor stuff. isapi now parses in multiple threads without problems. cannot load dl's yet.
Index: php31/main/debugger.c
diff -c php31/main/debugger.c:1.4 php31/main/debugger.c:1.5
*** php31/main/debugger.c:1.4 Sat May 30 17:46:57 1998
--- php31/main/debugger.c Sun May 31 10:57:32 1998
***************
*** 106,112 ****
"Debugger",
debugger_functions,
php3_minit_debugger,
! NULL,
php3_rinit_debugger,
php3_rshutdown_debugger,
NULL, 0, 0, 0, NULL
--- 106,112 ----
"Debugger",
debugger_functions,
php3_minit_debugger,
! php3_mshutdown_debugger,
php3_rinit_debugger,
php3_rshutdown_debugger,
NULL, 0, 0, 0, NULL
***************
*** 172,178 ****
if (err == -1) {
return NULL;
}
! return (char *) estrdup(tmpname);
}
--- 172,178 ----
if (err == -1) {
return NULL;
}
! return (char *) strdup(tmpname);
}
***************
*** 256,273 ****
if (cfg_get_long("debugger.enabled", &GLOBAL(debugger_default)) == FAILURE) {
GLOBAL(debugger_default) = 0;
}
return SUCCESS;
}
int php3_rinit_debugger(INIT_FUNC_ARGS)
{
TLS_VARS;
if (GLOBAL(debugger_default)) {
- GLOBAL(myhostname) = find_hostname();
- GLOBAL(mypid) = getpid();
php3_start_debugger(NULL);
}
--- 256,283 ----
if (cfg_get_long("debugger.enabled", &GLOBAL(debugger_default)) == FAILURE) {
GLOBAL(debugger_default) = 0;
}
+ GLOBAL(myhostname) = find_hostname();
+ GLOBAL(mypid) = getpid();
return SUCCESS;
}
+ int php3_mshutdown_debugger(void)
+ {
+ TLS_VARS;
+
+ if (GLOBAL(myhostname)) {
+ free(GLOBAL(myhostname));
+ }
+ return SUCCESS;
+ }
+
int php3_rinit_debugger(INIT_FUNC_ARGS)
{
TLS_VARS;
if (GLOBAL(debugger_default)) {
php3_start_debugger(NULL);
}
***************
*** 279,292 ****
{
TLS_VARS;
! if (GLOBAL(debugger_default)) {
! php3_stop_debugger();
! #if 0
! if (GLOBAL(myhostname)) {
! efree(GLOBAL(myhostname));
! }
! #endif
! }
return SUCCESS;
}
--- 289,295 ----
{
TLS_VARS;
! php3_stop_debugger();
return SUCCESS;
}
Index: php31/main/main.c
diff -c php31/main/main.c:1.13 php31/main/main.c:1.14
*** php31/main/main.c:1.13 Sat May 30 20:48:53 1998
--- php31/main/main.c Sun May 31 10:57:32 1998
***************
*** 29,35 ****
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 1.13 1998/05/31 00:48:53 shane Exp $ */
/* #define CRASH_DETECTION */
--- 29,35 ----
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 1.14 1998/05/31 14:57:32 shane Exp $ */
/* #define CRASH_DETECTION */
***************
*** 2393,2404 ****
msvc5_debug("%d:main tls initialized\n",GetCurrentThreadId());
#endif
if(!php3_globals){
! #if DODEBUGGER
! msvc5_debug("%d:main Could not get TLS VAR!\n",GetCurrentThreadId());
! #endif
! sapi_info->send_header(sapi_info);
! sapi_info->puts(sapi_info->scid,"IIS Internal Error: Thread not initialized!");
! return SUCCESS;
}
PHP3_TLS_GET(phpLexTlsIndex,php_gbl);
#endif
--- 2393,2412 ----
msvc5_debug("%d:main tls initialized\n",GetCurrentThreadId());
#endif
if(!php3_globals){
! /* uninitialized thread, initialize now */
! _php3_sapi_thread_start();
! PHP3_TLS_GET(TlsIndex,php3_globals);
! if(!php3_globals){
! /*
! something is realy screwed up if we get here.
! send output to the browser manualy, because nothing in
! php is or can be initialized, but we can because sapi
! is initialized
! */
! sapi_info->send_header(sapi_info);
! sapi_info->puts(sapi_info->scid,"IIS Internal Error: Thread could not initialized!");
! return SUCCESS;
! }
}
PHP3_TLS_GET(phpLexTlsIndex,php_gbl);
#endif
- Next message: Shane Caraveo: "[PHP-DEV] isapi status"
- Previous message: rasmus: "[PHP-DEV] CVS update: php31/ext/standard"
- Next in thread: shane: "[PHP-DEV] CVS update: php31/main"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

