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

Allow customization of run_process cancellation behavior #1525

Merged

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented May 16, 2020

And also tweak the default to something a bit nicer on Unix.

Fixes: #1209

And also tweak the default to something a bit nicer on Unix.
@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #1525 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1525   +/-   ##
=======================================
  Coverage   99.67%   99.67%           
=======================================
  Files         107      107           
  Lines       13239    13302   +63     
  Branches     1006     1009    +3     
=======================================
+ Hits        13196    13259   +63     
  Misses         28       28           
  Partials       15       15           
Impacted Files Coverage Δ
trio/_subprocess.py 100.00% <100.00%> (ø)
trio/tests/test_subprocess.py 100.00% <100.00%> (ø)

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work, thanks!

Copy link
Member

@oremanj oremanj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great way of implementing this feature - thanks for putting it up! Sorry for the late review but I noticed a couple bits of potential polish if you feel like revisiting.

trio/_subprocess.py Show resolved Hide resolved
trio/_subprocess.py Show resolved Hide resolved
trio/tests/test_subprocess.py Show resolved Hide resolved
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.

What should run_process do if it's cancelled but it can't kill the child process?
3 participants