MCPcopy Create free account
hub / github.com/DataDog/datadog-agent / SetPythonPsutilProcPath

Function SetPythonPsutilProcPath

pkg/collector/python/helpers.go:229–245  ·  view source on GitHub ↗

SetPythonPsutilProcPath sets python psutil.PROCFS_PATH

(procPath string)

Source from the content-addressed store, hash-verified

227
228// SetPythonPsutilProcPath sets python psutil.PROCFS_PATH
229func SetPythonPsutilProcPath(procPath string) error {
230 glock, err := newStickyLock()
231 if err != nil {
232 return err
233 }
234 defer glock.unlock()
235
236 module := TrackedCString(psutilModule)
237 defer C._free(unsafe.Pointer(module))
238 attrName := TrackedCString(psutilProcPath)
239 defer C._free(unsafe.Pointer(attrName))
240 attrValue := TrackedCString(procPath)
241 defer C._free(unsafe.Pointer(attrValue))
242
243 C.set_module_attr_string(rtloader, module, attrName, attrValue)
244 return getRtLoaderError()
245}

Callers 1

pyPrepareEnvFunction · 0.92

Calls 4

newStickyLockFunction · 0.85
getRtLoaderErrorFunction · 0.85
unlockMethod · 0.80
TrackedCStringFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…