CVS update: php3

From: Date: Thu, 13 May 1999 20:15:08 +0000
Subject: CVS update: php3
Groups: php.dev 
Request: Send a blank email to php-dev+get-5605@lists.php.net to get a copy of this message
Date: Thursday May 13, 1999 @ 16:15 Author: sas Update of /repository/php3 In directory php:/tmp/cvs-serv19127 Modified Files: ChangeLog language-parser.y main.c Log Message: let CGI version set exit status Index: php3/ChangeLog diff -u php3/ChangeLog:1.626 php3/ChangeLog:1.627 --- php3/ChangeLog:1.626 Wed May 12 08:41:44 1999 +++ php3/ChangeLog Thu May 13 16:15:07 1999 @@ -1,6 +1,7 @@ PHP 3.0 CHANGE LOG ChangeLog ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? 1999, Version 3.0.8 +- Let exit/die set exit status in CGI version (Sascha) - Make substr() binary-safe (RL) - OCIError can now be called without any arguments to check the error of a failed OCILogon. (Thies C. Arntzen) Index: php3/language-parser.y diff -u php3/language-parser.y:1.178 php3/language-parser.y:1.179 --- php3/language-parser.y:1.178 Fri Jan 1 12:58:50 1999 +++ php3/language-parser.y Thu May 13 16:15:07 1999 @@ -31,7 +31,7 @@ */ -/* $Id: language-parser.y,v 1.178 1999/01/01 17:58:50 zeev Exp $ */ +/* $Id: language-parser.y,v 1.179 1999/05/13 20:15:07 sas Exp $ */ /* @@ -51,6 +51,7 @@ #else extern char *phptext; extern int phpleng; +extern int wanted_exit_status; #define YY_TLS_VARS #endif #include "php.h" @@ -549,7 +550,7 @@ | OBJECT_CAST expr { if (GLOBAL(Execute)) { convert_to_object(&$2); $$ = $2; } } | EXIT { if (GLOBAL(Execute)) { php3_header(); GLOBAL(shutdown_requested)=ABNORMAL_SHUTDOWN; $$.type=IS_LONG; $$.value.lval=1; } } | EXIT '(' ')' { if (GLOBAL(Execute)) { php3_header(); GLOBAL(shutdown_requested)=ABNORMAL_SHUTDOWN; $$.type=IS_LONG; $$.value.lval=1; } } - | EXIT '(' expr ')' { if (GLOBAL(Execute)) { if (php3_header()) { convert_to_string(&$3); PUTS($3.value.str.val); pval_destructor(&$3 _INLINE_TLS); } GLOBAL(shutdown_requested)=ABNORMAL_SHUTDOWN; $$.type=IS_LONG; $$.value.lval=1; } } + | EXIT '(' expr ')' { if (GLOBAL(Execute)) { if (php3_header()) { convert_to_string(&$3); PUTS($3.value.str.val); pval_destructor(&$3 _INLINE_TLS); } GLOBAL(shutdown_requested)=ABNORMAL_SHUTDOWN; convert_to_long(&$3); wanted_exit_status = $3.value.lval; $$.type=IS_LONG; $$.value.lval=1; } } | '@' { $1.cs_data.error_reporting=GLOBAL(error_reporting); GLOBAL(error_reporting)=0; } expr { GLOBAL(error_reporting)=$1.cs_data.error_reporting; $$ = $3; } | '@' error { php3_error(E_ERROR,"@ operator may only be used on expressions"); } | scalar { if (GLOBAL(Execute)) $$ = $1; } Index: php3/main.c diff -u php3/main.c:1.496 php3/main.c:1.497 --- php3/main.c:1.496 Sun Mar 7 10:49:15 1999 +++ php3/main.c Thu May 13 16:15:08 1999 @@ -29,7 +29,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.496 1999/03/07 15:49:15 rasmus Exp $ */ +/* $Id: main.c,v 1.497 1999/05/13 20:15:08 sas Exp $ */ /* #define CRASH_DETECTION */ @@ -105,6 +105,7 @@ int initialized; /* keep track of which resources were successfully initialized */ static int module_initialized = 0; char *php3_ini_path = NULL; +int wanted_exit_status = 0; int shutdown_requested; unsigned char header_is_being_sent; unsigned int max_execution_time = 0; @@ -1869,7 +1870,7 @@ tls_shutdown(); tls_destroy(); #endif - return SUCCESS; + exit(wanted_exit_status); } else { return FAILURE; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5605) next »