Suspends execution on all threads of the process. @raise WindowsError: On error an exception is raised.
(self)
| 369 | win32.TerminateProcess(hProcess, dwExitCode) |
| 370 | |
| 371 | def suspend(self): |
| 372 | """ |
| 373 | Suspends execution on all threads of the process. |
| 374 | |
| 375 | @raise WindowsError: On error an exception is raised. |
| 376 | """ |
| 377 | self.scan_threads() # force refresh the snapshot |
| 378 | suspended = list() |
| 379 | try: |
| 380 | for aThread in self.iter_threads(): |
| 381 | aThread.suspend() |
| 382 | suspended.append(aThread) |
| 383 | except Exception: |
| 384 | for aThread in suspended: |
| 385 | try: |
| 386 | aThread.resume() |
| 387 | except Exception: |
| 388 | pass |
| 389 | raise |
| 390 | |
| 391 | def resume(self): |
| 392 | """ |
no test coverage detected