• Use bbs.exec() to execute msglist.js instead of load() for on-exit cle

    From Deuce@1:103/705 to GitLab note in main/sbbs on Mon Jan 4 11:22:00 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e389f2e7612b6985aa97340f180bea844927296a#note_1280

    <Deuce> It's likely because exit() isn't being called.<Deuce> DigitalMan, If you add exit() to the end of the script on_exit() handlers should be called.<Deuce> If you don't, they won't be called until something calls exit() or until the outermost script terminates.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Jan 4 11:35:00 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e389f2e7612b6985aa97340f180bea844927296a#note_1281

    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.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deuce@1:103/705 to GitLab note in main/sbbs on Mon Jan 4 13:05:14 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e389f2e7612b6985aa97340f180bea844927296a#note_1283

    There are already some calls to exit() in the script... when a message base can't be opened or contains no messages.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Jan 4 13:40:19 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/e389f2e7612b6985aa97340f180bea844927296a#note_1284

    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.
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)