Skip to content

Fix waiting on child processes blocking indefinitely #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

jonatanklosko
Copy link
Member

Currently subprocess.run never finishes. Quoting the code comment:

# Some APIs in Python, such as subprocess.run, wait for a child
# OS process to finish. On Unix, this relies on `waitpid` C API,
# which does not work properly if SIGCHLD is ignored, resulting
# in infinite waiting. ERTS ignores the signal by default, so we
# explicitly restore the default handler.

It turns out we do exactly the same in EXLA.

@jonatanklosko jonatanklosko merged commit ea29718 into main Mar 3, 2025
9 checks passed
@jonatanklosko jonatanklosko deleted the jk-sigchld branch March 3, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant