fix at-exit close handling for non-main place
This bug has been causing problems since the change to the `math` library to register mpfr_free_cache() only once per place.
This commit is contained in:
parent
4af6770ed4
commit
eca0c18730
|
@ -1846,7 +1846,8 @@ void scheme_add_atexit_closer(Scheme_Exit_Closer_Func f)
|
||||||
# define RUNNING_IN_ORIGINAL_PLACE 1
|
# define RUNNING_IN_ORIGINAL_PLACE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!cust_closers && RUNNING_IN_ORIGINAL_PLACE) {
|
if (!cust_closers) {
|
||||||
|
if (RUNNING_IN_ORIGINAL_PLACE) {
|
||||||
if (replacement_at_exit) {
|
if (replacement_at_exit) {
|
||||||
replacement_at_exit(do_run_atexit_closers_on_all);
|
replacement_at_exit(do_run_atexit_closers_on_all);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1856,6 +1857,7 @@ void scheme_add_atexit_closer(Scheme_Exit_Closer_Func f)
|
||||||
atexit(do_run_atexit_closers_on_all);
|
atexit(do_run_atexit_closers_on_all);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
REGISTER_SO(cust_closers);
|
REGISTER_SO(cust_closers);
|
||||||
cust_closers = scheme_null;
|
cust_closers = scheme_null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user