MCPcopy Create free account
hub / github.com/ipython/ipython / check_pid

Function check_pid

IPython/utils/_process_posix.py:214–225  ·  view source on GitHub ↗
(pid)

Source from the content-addressed store, hash-verified

212system = ProcessHandler().system
213
214def check_pid(pid):
215 try:
216 os.kill(pid, 0)
217 except OSError as err:
218 if err.errno == errno.ESRCH:
219 return False
220 elif err.errno == errno.EPERM:
221 # Don't have permission to signal the process - probably means it exists
222 return True
223 raise
224 else:
225 return True

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected