(proc)
| 99 | |
| 100 | |
| 101 | def kill_recursive(proc): |
| 102 | try: |
| 103 | parent = psutil.Process(proc.pid) |
| 104 | children = parent.children(recursive=True) |
| 105 | for child in children: |
| 106 | logger.info(f"Killing child process {child.pid}") |
| 107 | child.kill() |
| 108 | logger.info(f"Killing parent process {proc.pid}") |
| 109 | parent.kill() |
| 110 | except psutil.NoSuchProcess: |
| 111 | logger.warning(f"Process {proc.pid} does not exist.") |
| 112 | |
| 113 | |
| 114 | process_manager = SubmoduleManager() |
no outgoing calls
no test coverage detected