MCPcopy Create free account
hub / github.com/bloomberg/pystack / isInterpreterActive

Method isInterpreterActive

src/pystack/_pystack/process.cpp:669–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

667}
668
669AbstractProcessManager::InterpreterStatus
670AbstractProcessManager::isInterpreterActive() const
671{
672 remote_addr_t runtime_addr = findSymbol("_PyRuntime");
673 if (runtime_addr) {
674 Structure<py_runtime_v> py_runtime(shared_from_this(), runtime_addr);
675 remote_addr_t p = py_runtime.getField(&py_runtime_v::o_finalizing);
676 return p == 0 ? InterpreterStatus::RUNNING : InterpreterStatus::FINALIZED;
677 }
678
679 return InterpreterStatus::UNKNOWN;
680}
681
682void
683AbstractProcessManager::setPythonVersionFromDebugOffsets()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected