From 47b1ee3266cc7f655896c8f746e7aa23f8546200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Fri, 28 Feb 1997 19:29:46 -0800 Subject: [PATCH] fix for exit() + threads Rev: src/builtin_functions.c:1.30 --- src/builtin_functions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/builtin_functions.c b/src/builtin_functions.c index fa144640aa..f6d7fb979c 100644 --- a/src/builtin_functions.c +++ b/src/builtin_functions.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: builtin_functions.c,v 1.29 1997/02/24 23:34:30 hubbe Exp $"); +RCSID("$Id: builtin_functions.c,v 1.30 1997/03/01 03:29:46 hubbe Exp $"); #include "interpret.h" #include "svalue.h" #include "macros.h" @@ -614,6 +614,10 @@ void f_exit(INT32 args) if(sp[-args].type != T_INT) error("Bad argument 1 to exit.\n"); +#ifdef _REENTRANT + if(num_threads) exit(i); +#endif + SET_ONERROR(tmp,exit_on_error,"Error in handle_error in master object!"); call_callback(&exit_callbacks, (void *)0); -- GitLab