1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-22 11:13:21 +00:00

Added metadata for Windows Child KVM process

This commit is contained in:
Bryan Roe
2020-05-29 10:15:41 -07:00
parent 25539b09d7
commit 7d56f621e7

View File

@@ -1225,6 +1225,10 @@ int kvm_relay_restart(int paused, void *pipeMgr, char *exePath, ILibKVM_WriteHan
gProcessSpawnType = (gProcessSpawnType == ILibProcessPipe_SpawnTypes_SPECIFIED_USER || gProcessSpawnType == ILibProcessPipe_SpawnTypes_USER) ? ILibProcessPipe_SpawnTypes_WINLOGON : (gProcessTSID < 0 ? ILibProcessPipe_SpawnTypes_USER : ILibProcessPipe_SpawnTypes_SPECIFIED_USER); gProcessSpawnType = (gProcessSpawnType == ILibProcessPipe_SpawnTypes_SPECIFIED_USER || gProcessSpawnType == ILibProcessPipe_SpawnTypes_USER) ? ILibProcessPipe_SpawnTypes_WINLOGON : (gProcessTSID < 0 ? ILibProcessPipe_SpawnTypes_USER : ILibProcessPipe_SpawnTypes_SPECIFIED_USER);
g_slavekvm = ILibProcessPipe_Process_GetPID(gChildProcess); g_slavekvm = ILibProcessPipe_Process_GetPID(gChildProcess);
char tmp[255];
sprintf_s(tmp, sizeof(tmp), "Child KVM (pid: %d)", g_slavekvm);
ILibProcessPipe_Process_ResetMetadata(gChildProcess, tmp);
ILibProcessPipe_Process_AddHandlers(gChildProcess, 65535, &kvm_relay_ExitHandler, &kvm_relay_StdOutHandler, &kvm_relay_StdErrHandler, NULL, user); ILibProcessPipe_Process_AddHandlers(gChildProcess, 65535, &kvm_relay_ExitHandler, &kvm_relay_StdOutHandler, &kvm_relay_StdErrHandler, NULL, user);
KVMDEBUG("kvm_relay_restart() launched child process", g_slavekvm); KVMDEBUG("kvm_relay_restart() launched child process", g_slavekvm);