pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-03-25
1999-03-25 16:16:49 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
9cbd7ea9d415ba64284a09e7e1637a6576924bc0 (
9
lines) (+
7
/-
2
)
[
Show
|
Annotate
]
Branch:
0.6
now calls error() if exit() is called twice..
Rev: src/builtin_functions.c:1.145
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: builtin_functions.c,v 1.
144
1999/
01
/
21
09
:
07
:
54
hubbe Exp $");
+
RCSID("$Id: builtin_functions.c,v 1.
145
1999/
03
/
25
16
:
16
:
49
hubbe Exp $");
#include "interpret.h" #include "svalue.h" #include "pike_macros.h"
1084:
void f_exit(INT32 args) {
+
static int in_exit=0;
if(args < 1) PIKE_ERROR("exit", "Too few arguments.\n", sp, args); if(sp[-args].type != T_INT) PIKE_ERROR("exit", "Bad argument 1.\n", sp, args);
-
+
if(in_exit) error("exit already called!\n");
+
in_exit=1;
+
assign_svalue(&throw_value, sp-args); throw_severity=THROW_EXIT; pike_throw();