Check if a process with the given PID (pid) exists
(pid)
| 63 | return output |
| 64 | |
| 65 | def check_pid(pid): |
| 66 | """ |
| 67 | Check if a process with the given PID (pid) exists |
| 68 | """ |
| 69 | try: |
| 70 | System.Diagnostics.Process.GetProcessById(pid) |
| 71 | # process with given pid is running |
| 72 | return True |
| 73 | except System.InvalidOperationException: |
| 74 | # process wasn't started by this object (but is running) |
| 75 | return True |
| 76 | except System.ArgumentException: |
| 77 | # process with given pid isn't running |
| 78 | return False |
nothing calls this directly
no outgoing calls
no test coverage detected