1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-21 10:43:36 +00:00

1. Fixed detached processes on Windows

2. Updated service-manager on Windows to add an uninstaller into Program Manager
3. Updated service-manager on Windows to try to delay spawn a process to delete a service, which is required if the service to be uninstalled is the currently running process.
This commit is contained in:
Bryan Roe
2020-01-15 14:53:12 -08:00
parent c02344373c
commit a9ef6d0f61
3 changed files with 50 additions and 16 deletions

View File

@@ -792,7 +792,7 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
if (spawnType != ILibProcessPipe_SpawnTypes_SPECIFIED_USER && spawnType != ILibProcessPipe_SpawnTypes_DEFAULT && (sessionId = WTSGetActiveConsoleSessionId()) == 0xFFFFFFFF) { return(NULL); } // No session attached to console, but requested to execute as logged in user
if (spawnType != ILibProcessPipe_SpawnTypes_DEFAULT)
if (spawnType != ILibProcessPipe_SpawnTypes_DEFAULT && spawnType != ILibProcessPipe_SpawnTypes_DETACHED)
{
procHandle = GetCurrentProcess();
if (OpenProcessToken(procHandle, TOKEN_DUPLICATE, &token) == 0) { ILIBMARKPOSITION(2); return(NULL); }