ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.22k stars 141 forks source link

Unwind on exit #940

Closed raviqqe closed 4 months ago

raviqqe commented 1 year ago

Description

This PR implements the unwinding of dynamic extents on a call to the exit procedure as described in "6.14. System interface" in the R7RS specification using call/cc.

Questions

> make install
...
if type ldconfig >/dev/null 2>/dev/null; then ldconfig; fi
echo "Generating images"
Generating images
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -mchibi.repl -d local/share/chibi/chibi.img
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -xscheme.red -mchibi.repl -d local/share/chibi/red.img
[ -z "" ] && LD_LIBRARY_PATH="local/lib:" DYLD_LIBRARY_PATH="local/lib:" CHIBI_MODULE_PATH="local/share/chibi:local/lib/chibi" local/bin/chibi-scheme -mchibi.snow.commands -mchibi.snow.interface -mchibi.snow.package -mchibi.snow.utils -d local/share/chibi/snow.img
WARNING: importing already defined binding: exit
WARNING: importing already defined binding: exit

Thanks ahead!

ashinn commented 5 months ago

Sorry for the long delay. I believe the warnings are from libraries which import both (chibi proces) and (scheme process-context), which both export exit. Before your change, this was the same binding so there was no warning.

I think the cleaner fix is to move these changes to (chibi process) which can export both exit and emergency-exit and just re-export these from (scheme process-context).

ashinn commented 4 months ago

Thanks!

raviqqe commented 4 months ago

Thank you too!