CVS update: php3/functions
| From: | rasmus | Date: | Wed, 27 Jan 1999 21:55:54 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3756@lists.php.net to get a copy of this message | ||
Date: Wednesday January 27, 1999 @ 16:55
Author: rasmus
Update of /repository/php3/functions
In directory asf:/home/rasmus/php3/functions
Modified Files:
basic_functions.c basic_functions.h info.c
Log Message:
Add ignore_user_abort .ini/.conf directive as well as the corresponding
user-level ignore_user_abort() function to let people define whether or
not they want their scripts to run to completion if the user aborts.
Index: php3/functions/basic_functions.c
diff -c php3/functions/basic_functions.c:1.254 php3/functions/basic_functions.c:1.255
*** php3/functions/basic_functions.c:1.254 Wed Jan 27 14:18:12 1999
--- php3/functions/basic_functions.c Wed Jan 27 16:55:53 1999
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: basic_functions.c,v 1.254 1999/01/27 19:18:12 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: basic_functions.c,v 1.255 1999/01/27 21:55:53 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
***************
*** 316,321 ****
--- 316,322 ----
PHP_FE(register_shutdown_function, NULL)
PHP_FE(connection_aborted, NULL)
+ PHP_FE(ignore_user_abort, NULL)
{NULL, NULL, NULL}
};
***************
*** 509,514 ****
--- 510,541 ----
TLS_VARS;
RETVAL_LONG(GLOBAL(connection_aborted));
+ }
+
+ /* {{{ proto int ignore_user_abort(boolean value)
+ Set whether we want to ignore a user abort event or not */
+ void php3_ignore_user_abort(INTERNAL_FUNCTION_PARAMETERS)
+ {
+ pval *arg;
+ int old_setting;
+ TLS_VARS;
+
+ old_setting = GLOBAL(ignore_user_abort);
+ switch (ARG_COUNT(ht)) {
+ case 0:
+ break;
+ case 1:
+ if (getParameters(ht,1,&arg) == FAILURE) {
+ RETURN_FALSE;
+ }
+ convert_to_long(arg);
+ GLOBAL(ignore_user_abort)=arg->value.lval;
+ break;
+ default:
+ WRONG_PARAM_COUNT;
+ break;
+ }
+ RETVAL_LONG(old_setting);
}
/* {{{ proto int error_reporting([int level])
Index: php3/functions/basic_functions.h
diff -c php3/functions/basic_functions.h:1.37 php3/functions/basic_functions.h:1.38
*** php3/functions/basic_functions.h:1.37 Wed Jan 27 14:18:13 1999
--- php3/functions/basic_functions.h Wed Jan 27 16:55:54 1999
***************
*** 29,35 ****
*/
! /* $Id: basic_functions.h,v 1.37 1999/01/27 19:18:13 rasmus Exp $ */
#ifndef _BASIC_FUNCTIONS_H
#define _BASIC_FUNCTIONS_H
--- 29,35 ----
*/
! /* $Id: basic_functions.h,v 1.38 1999/01/27 21:55:54 rasmus Exp $ */
#ifndef _BASIC_FUNCTIONS_H
#define _BASIC_FUNCTIONS_H
***************
*** 96,101 ****
--- 96,102 ----
extern void php3_call_user_func(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_call_user_method(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_connection_aborted(INTERNAL_FUNCTION_PARAMETERS);
+ extern void php3_ignore_user_abort(INTERNAL_FUNCTION_PARAMETERS);
PHP_FUNCTION(register_shutdown_function);
Index: php3/functions/info.c
diff -c php3/functions/info.c:1.71 php3/functions/info.c:1.72
*** php3/functions/info.c:1.71 Mon Jan 25 00:13:30 1999
--- php3/functions/info.c Wed Jan 27 16:55:54 1999
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: info.c,v 1.71 1999/01/25 05:13:30 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: info.c,v 1.72 1999/01/27 21:55:54 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
***************
*** 162,167 ****
--- 162,168 ----
PHP3_CONF_LONG("error_reporting", php3_ini_master.errors, php3_ini.errors);
PHP3_CONF_STR("extension_dir", php3_ini_master.extension_dir, php3_ini.extension_dir);
PHP3_CONF_STR("gpc_order", php3_ini_master.gpc_order, php3_ini.gpc_order);
+ PHP3_CONF_LONG("ignore_user_abort", php3_ini_master.ignore_user_abort,
php3_ini.ignore_user_abort);
PHP3_CONF_STR("include_path", php3_ini_master.include_path, php3_ini.include_path);
PHP3_CONF_STR("isapi_ext", php3_ini_master.isapi_ext, php3_ini.isapi_ext);
PHP3_CONF_LONG("last_modified", php3_ini_master.last_modified, php3_ini.last_modified);
--
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