efree(PHPDBG_G(exec));
PHPDBG_G(exec) = NULL;
}
-
+
if (PHPDBG_G(oplog)) {
fclose(
PHPDBG_G(oplog));
efree(PHPDBG_G(ops));
PHPDBG_G(ops) = NULL;
}
-
+
return SUCCESS;
} /* }}} */
int php_optind;
int opt;
long cleaning = 0;
-
+
#ifdef ZTS
void ***tsrm_ls;
#endif
case 'z':
zend_load_extension(php_optarg);
break;
-
+
/* begin phpdbg options */
case 'e': { /* set execution context */
exec = strdup(php_optarg);
}
} break;
-
+
case 'I': { /* ignore .phpdbginit */
init_file_default = 0;
} break;
-
+
case 'i': { /* set init file */
init_file_len = strlen(php_optarg);
if (init_file_len) {
init_file = strdup(php_optarg);
}
} break;
-
+
case 'O': { /* set oplog output */
oplog_file_len = strlen(php_optarg);
if (oplog_file_len) {
free(exec);
}
-
+
if (oplog_file) { /* open oplog */
PHPDBG_G(oplog) = fopen(oplog_file, "w+");
if (!PHPDBG_G(oplog)) {
cleaning = 1;
goto phpdbg_out;
} else cleaning = 0;
-
+
if (PHPDBG_G(flags) & PHPDBG_IS_QUITTING) {
goto phpdbg_out;
}
sapi_shutdown();
}
-
+
if (cleaning) {
goto phpdbg_main;
}
#ifdef ZTS
- /* bugggy */
- //tsrm_shutdown();
+ /* bugggy */
+ /* tsrm_shutdown(); */
#endif
return 0;