Use bbs.exec() to execute msglist.js instead of load() for on-exit clean-up
The on-exit handlers which restore the console and system flags back to their previous states don't execute when load()'d from this script. Not sure why (Deuce?) - using bbs.exec() as a work-around now. :-(
parent
fdb743f4
No related branches found
No related tags found
-
load() is probably just not the right thing to use in this instance. We don't want the parent script to terminate when the load'd script terminates, which would happen if it (the child script) called exit(). Not what I want.
Also, we can't rely on the child script to call exit() anyway as it could abend with an exception instead.
-
Yeah, which means it (msglist.js) should not have been load()'d to begin with, so that was a wrong turn.
I still think here's a problem with js.on_exit() however, because when email_sec.js (which is invoked via external->js_execfile) terminated, the on-exit handlers that were installed via the load()ed msglist.js where not executed.
Please register or sign in to comment