MCPcopy Index your code
hub / github.com/python/cpython / poll

Method poll

Lib/multiprocessing/popen_fork.py:25–35  ·  view source on GitHub ↗
(self, flag=os.WNOHANG)

Source from the content-addressed store, hash-verified

23 return fd
24
25 def poll(self, flag=os.WNOHANG):
26 if self.returncode is None:
27 try:
28 pid, sts = os.waitpid(self.pid, flag)
29 except OSError:
30 # Child process not yet created. See #1731717
31 # e.errno == errno.ECHILD == 10
32 return None
33 if pid == self.pid:
34 self.returncode = os.waitstatus_to_exitcode(sts)
35 return self.returncode
36
37 def wait(self, timeout=None):
38 if self.returncode is None:

Callers 15

_run_with_syncFunction · 0.95
test_pollMethod · 0.95
_killMethod · 0.95
_kill_with_eventMethod · 0.95
waitMethod · 0.95
_cleanupFunction · 0.45
is_aliveMethod · 0.45
closeMethod · 0.45
exitcodeMethod · 0.45

Calls

no outgoing calls

Tested by 5

test_pollMethod · 0.76
_killMethod · 0.76
_kill_with_eventMethod · 0.76