MCPcopy
hub / github.com/amoffat/sh / no_interrupt

Function no_interrupt

src/sh/__init__.py:1838–1853  ·  view source on GitHub ↗

a helper for making system calls immune to EINTR

(syscall, *args, **kwargs)

Source from the content-addressed store, hash-verified

1836
1837
1838def no_interrupt(syscall, *args, **kwargs):
1839 """a helper for making system calls immune to EINTR"""
1840 ret = None
1841
1842 while True:
1843 try:
1844 ret = syscall(*args, **kwargs)
1845 except OSError as e:
1846 if e.errno == errno.EINTR:
1847 continue
1848 else:
1849 raise
1850 else:
1851 break
1852
1853 return ret
1854
1855
1856class OProc:

Callers 4

is_aliveMethod · 0.85
waitMethod · 0.85
output_threadFunction · 0.85
readMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected