mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-09 22:50:34 -07:00
modules: release all resources on ecl_halt
Previously we were lazy and simply marked the runtime as "not booted", but now we do perform a proper shutdown.
This commit is contained in:
parent
0aa2707d5f
commit
f1ffa821ce
1 changed files with 5 additions and 3 deletions
|
|
@ -260,20 +260,22 @@ ecl_boot(void)
|
|||
i = ecl_option_values[ECL_OPT_BOOTED];
|
||||
if (i) {
|
||||
if (i < 0) {
|
||||
/* We have called cl_shutdown and want to use ECL again. */
|
||||
/* The runtime has been only suspended. Resume it.*/
|
||||
ecl_set_option(ECL_OPT_BOOTED, 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
init_modules();
|
||||
ecl_core.path_max = MAXPATHLEN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ecl_halt(void)
|
||||
{
|
||||
ecl_set_option(ECL_OPT_BOOTED, -1);
|
||||
int i = ecl_option_values[ECL_OPT_BOOTED];
|
||||
if (i > 0)
|
||||
free_modules();
|
||||
ecl_set_option(ECL_OPT_BOOTED, 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue