pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-03-25
1999-03-25 16:11:18 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
b4c5de57ebd57cfa262d08233eb7877644f0b6c5 (
7
lines) (+
6
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
now calls error() if exit() is called twice..
Rev: src/builtin_functions.c:1.163
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
162
1999/03/
20
22
:
54
:
16
grubba
Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
163
1999/03/
25
16
:
11
:
18
hubbe
Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
1234:
void f_exit(INT32 args) {
+
static int in_exit=0;
CHECK_SECURITY_OR_ERROR(SECURITY_BIT_SECURITY, ("exit: permission denied.\n")); if(args < 1) SIMPLE_TOO_FEW_ARGS_ERROR("exit", 1);
1241:
if(sp[-args].type != T_INT) SIMPLE_BAD_ARG_ERROR("exit", 1, "int");
+
if(in_exit) error("exit already called!\n");
+
in_exit=1;
+
assign_svalue(&throw_value, sp-args); throw_severity=THROW_EXIT; pike_throw();