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 sphinx-autobuild time to shutdown http server in tox #2647

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Jun 13, 2024

Changes

  • Tox is apparently a bit aggressive in shutting down processes when it receives a CTRL+C; this can ultimately result in tox exiting and leaving the HTTP server still running requiring manual process kills.
  • I think this results from sphinx-autobuild receiving the SIGINT and starting its shutdown...but tox then sends it another SIGINT that seems to abort the shutdown procedure for sphinx-autobuild.
  • So, this gives sphinx-autobuild a window of time to shutdown before tox starts trying to help.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

- Tox is apparently a bit aggressive in shutting down processes when it
  receives a CTRL+C; this can ultimately result in tox exiting and
  leaving the HTTP server still running requiring manual process kills.
- I think this results from ``sphinx-autobuild`` receiving the SIGINT
  and starting its shutdown...but tox then sends it _another_ SIGINT
  that seems to abort the shutdown procedure for ``sphinx-autobuild``.
- So, this gives ``sphinx-autobuild`` a window of time to shutdown
  before tox starts trying to help.
@rmartin16 rmartin16 force-pushed the docs-live-shutdown branch from 794cf09 to 4ea3c24 Compare June 13, 2024 21:59
@rmartin16 rmartin16 marked this pull request as ready for review June 13, 2024 22:27
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

Oh! I figured the "failed build" from the docs-live target was just the side effect of "killing" the build... I didn't realise it was tox getting in the way. Nice fix.

@freakboy3742 freakboy3742 merged commit ad6635d into beeware:main Jun 13, 2024
31 of 34 checks passed
@rmartin16 rmartin16 deleted the docs-live-shutdown branch June 14, 2024 00:02
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