You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/gpshead'closed_at=<Date2018-09-14.05:24:27.467>created_at=<Date2018-09-13.10:57:27.885>labels= ['extension-modules', '3.8', 'type-bug', '3.7']
title='subprocess with preexec_fn when fork() fails could corrupt PyErr state'updated_at=<Date2018-09-14.05:24:27.465>user='https://github.com/gpshead'
Found in the stdlib test suite while testing the fix for bpo-6721: When subprocess is called with a preexec_fn and os.register_at_fork has been used and the fork() system call fails, the Python error state is set before the "after fork in parent process" function calls that were registered were called. So they'd call back into Python code with a pending unreturned exception set.
boom. SystemError (or assertion failure in pydebug builds).