MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / watcher_windows_terminate_verified

Function watcher_windows_terminate_verified

tests/test_watcher.c:995–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993}
994
995static bool watcher_windows_terminate_verified(HANDLE process,
996 const watcher_windows_image_identity_t *expected,
997 uint64_t deadline_ms) {
998 if (!process) {
999 return false;
1000 }
1001 if (WaitForSingleObject(process, 0U) == WAIT_OBJECT_0) {
1002 return true;
1003 }
1004 /* Re-query the live process image immediately before the only test-side
1005 * kill. The retained handle fixes the process instance; canonical path and
1006 * file identity ensure a cleanup backstop can target only our private copy. */
1007 if (!watcher_windows_process_matches_image(process, expected) ||
1008 TerminateProcess(process, 99U) == 0) {
1009 return false;
1010 }
1011 return watcher_windows_wait_process_gone(process, deadline_ms);
1012}
1013#endif
1014
1015#if defined(__APPLE__) || defined(__linux__)

Callers 1

test_watcher.cFile · 0.85

Tested by

no test coverage detected