Skip to content
Snippets Groups Projects
Commit c22063f9 authored by rswindell's avatar rswindell
Browse files

Clear the console-abort flag upon return from executing a JS or Baja module.

This solves the problem of a JS-external program (e.g. SyncWX) being aborted
at a pause prompt with Ctrl-C or Q and that abort status propagating back to
the external program's menu. If there is a module which needs to propagate
the console-abort status up to the parent(s), then this could introduce a
problem. We'll see.
parent 172b0e71
No related branches found
No related tags found
No related merge requests found
......@@ -669,6 +669,7 @@ long sbbs_t::js_execfile(const char *cmd, const char* startup_dir, JSObject* sco
js_PrepareToExecute(js_cx, js_glob, path, startup_dir, js_scope);
}
JS_ExecuteScript(js_cx, js_scope, js_script, &rval);
sys_status &=~ SS_ABORT;
if(scope==NULL) {
JS_GetProperty(js_cx, js_scope, "exit_code", &rval);
......@@ -781,6 +782,7 @@ long sbbs_t::exec_bin(const char *cmdline, csi_t *csi, const char* startup_dir)
freevars(&bin);
free(bin.cs);
csi->logic=bin.logic;
sys_status &=~ SS_ABORT;
return(bin.retval);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment