SetPythonPsutilProcPath sets python psutil.PROCFS_PATH
(procPath string)
| 227 | |
| 228 | // SetPythonPsutilProcPath sets python psutil.PROCFS_PATH |
| 229 | func 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 | } |
no test coverage detected
searching dependent graphs…