1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-02 16:43:28 +00:00

Fixed Installer/Uninstaller

1. Remapped -fulluninstall to -funinstall
2. Updated behavior so db is not loaded if agent-installer is invoked
3. Renamed Windows Uninstaller from MeshCentralAgent to Mesh Agent for consistency
4. Update service-manager.installService(), such that if the service is the mesh agent, the windows uninstaller will invoke -fulluninstall
5. Updated agent-installer so that secondary agent and its scheduled tasks will be deleted on uninstall
6. Updated event-emitter, so if process.exit() is called on an emit(), it won't throw a catchable exception
This commit is contained in:
Bryan Roe
2020-04-07 00:03:11 -07:00
parent d1fcb0cd61
commit b8208f63ed
6 changed files with 123 additions and 52 deletions

File diff suppressed because one or more lines are too long

View File

@@ -233,13 +233,22 @@ duk_ret_t ILibDuktape_EventEmitter_emit(duk_context *ctx)
if (emitList[i].once != 0)
{
// Delete reference to callback function
duk_push_heapptr(ctx, data->tmpObject);
duk_push_heapptr(ctx, data->tmpObject);
duk_del_prop_string(ctx, -1, Duktape_GetStashKey(func));
duk_pop(ctx);
}
duk_push_heapptr(ctx, func); // [func]
return(ILibDuktape_Error(ctx, "EventEmitter.emit(): Event dispatch for '%s' on '%s' threw an exception: %s in method '%s()'", name, objid, duk_safe_to_string(ctx, -2), Duktape_GetStringPropertyValue(ctx, -1, "name", "unknown_method")));
if (strcmp(duk_safe_to_string(ctx, -2), "Process.exit() forced script termination") == 0)
{
duk_dup(ctx, -2);
duk_throw(ctx);
return(DUK_RET_ERROR);
}
else
{
return(ILibDuktape_Error(ctx, "EventEmitter.emit(): Event dispatch for '%s' on '%s' threw an exception: %s in method '%s()'", name, objid, duk_safe_to_string(ctx, -2), Duktape_GetStringPropertyValue(ctx, -1, "name", "unknown_method")));
}
}
if (emitList[i].once != 0)