MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ddio_CheckProcess

Function ddio_CheckProcess

ddio/winfile.cpp:533–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533bool ddio_CheckProcess(int pid) {
534 HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid);
535 if (proc) {
536 DWORD obj_ret = WaitForSingleObject(proc, 0);
537 CloseHandle(proc);
538 if (obj_ret == WAIT_TIMEOUT) {
539 // this process exists still
540 return true;
541 }
542 }
543 return false;
544}
545
546int ddio_GetPID() {
547 return GetCurrentProcessId();

Callers 1

ddio_CreateLockFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected