Skip to content

Check return codes in mp_run_process #17882

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
Sep 19, 2022
Merged

Check return codes in mp_run_process #17882

merged 1 commit into from
Sep 19, 2022

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 19, 2022

This codepath is not normally used since once currently needs to opt into using via EM_PYTHON_MULTIPROCESSING=1.

However, I'm hoping to remove that limitation in #17881. This cleaanup/fix should land before #17881 does.

The primary change here is to switch from subprocessrun.Popen to subprocess.run which supports the check=True argument. As well as avoiding the need for the call to communicate()

@sbc100 sbc100 requested review from juj and kripken September 19, 2022 07:56
@sbc100 sbc100 force-pushed the fix_mulitple_subprocesses branch from ae15c78 to 93de0d1 Compare September 19, 2022 07:58
This codepath is not normally used since once currently needs to
opt into using via EM_PYTHON_MULTIPROCESSING=1.

However, I'm hoping to remove that limitation in #17881.  This
cleaanup/fix should land before #17881 does.

The primary change here is to switch from `subprocessrun.Popen` to
`subprocess.run` which supports the `check=True` argument.  As well
as avoiding the need for the call to `communicate()`
@sbc100 sbc100 force-pushed the fix_mulitple_subprocesses branch from 93de0d1 to 4e88460 Compare September 19, 2022 08:05
@sbc100 sbc100 enabled auto-merge (squash) September 19, 2022 16:30
@sbc100 sbc100 merged commit 062e05f into main Sep 19, 2022
@sbc100 sbc100 deleted the fix_mulitple_subprocesses branch September 19, 2022 19:41
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.

2 participants