this should only ever be called once for each child process
(exit_code)
| 1822 | |
| 1823 | |
| 1824 | def handle_process_exit_code(exit_code): |
| 1825 | """this should only ever be called once for each child process""" |
| 1826 | # if we exited from a signal, let our exit code reflect that |
| 1827 | if os.WIFSIGNALED(exit_code): |
| 1828 | exit_code = -os.WTERMSIG(exit_code) |
| 1829 | # otherwise just give us a normal exit code |
| 1830 | elif os.WIFEXITED(exit_code): |
| 1831 | exit_code = os.WEXITSTATUS(exit_code) |
| 1832 | else: |
| 1833 | raise RuntimeError("Unknown child exit status!") |
| 1834 | |
| 1835 | return exit_code |
| 1836 | |
| 1837 | |
| 1838 | def no_interrupt(syscall, *args, **kwargs): |