Skip to content
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

services.launch subprocess - linter warns that preexec_fn can lead to deadlocks when used in threads #186

Open
Lance-Drane opened this issue May 30, 2024 · 0 comments

Comments

@Lance-Drane
Copy link

This needs to be tested but Ruff's linting rules and Python's subprocess documentation suggests that using preexec_fn is unsafe and can lead to deadlocks. This may be related to the issue previously experienced with Dask not gracefully shutting down.

The most straightforward fix appears to be using start_new_session=True as an argument, and leaving off preexec_fn. Python 3.11 also supports using a process_group argument.

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

No branches or pull requests

1 participant