saghul / sjs

Skookum JS: a JavaScript runtime
http://sjs.saghul.net
MIT License
97 stars 13 forks source link

modules: add atexit module #29

Open saghul opened 8 years ago

saghul commented 8 years ago

We will need a way to cleanly exit the interpreter instead of just doing exit. Probably use an exception SJSExit, VMExit or SystemExit to signal this, then capture it, run atexit handlers and call exit(code).