Skip to content
New issue

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

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

Already on GitHub? # to your account

server: Add wait_timeout and properly close pipe fds during afork #46

Merged
merged 4 commits into from
Mar 22, 2022

Conversation

achimnol
Copy link
Owner

Sometimes interrupting the process using aiotools.afork() hangs due to signal race.
Let's minimize the exposed surface of event loops in the child process.

@achimnol achimnol added the bug label Mar 22, 2022
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #46 (e22e1ae) into main (c598e31) will decrease coverage by 0.56%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main      #46      +/-   ##
==========================================
- Coverage   79.24%   78.68%   -0.57%     
==========================================
  Files          16       16              
  Lines        1306     1323      +17     
==========================================
+ Hits         1035     1041       +6     
- Misses        271      282      +11     
Impacted Files Coverage Δ
src/aiotools/server.py 49.65% <33.33%> (-0.52%) ⬇️
src/aiotools/fork.py 75.16% <55.55%> (-2.94%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c598e31...e22e1ae. Read the comment docs.

- If specified, aiotools will send SIGKILL to all remaining processes
  to ensure termination.
@achimnol achimnol marked this pull request as ready for review March 22, 2022 08:53
@achimnol achimnol changed the title fix: Minimize event loop footprint before fork server: Add wait_timeout and properly close pipe fds during afork Mar 22, 2022
@achimnol achimnol merged commit 4ce6729 into main Mar 22, 2022
@achimnol achimnol deleted the fix/afork-signal-race branch March 22, 2022 08:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant