Skip to content

[2.7] bpo-31479: Always reset the signal alarm in tests (GH-3588) #7314

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
Jun 1, 2018
Merged

[2.7] bpo-31479: Always reset the signal alarm in tests (GH-3588) #7314

merged 1 commit into from
Jun 1, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 1, 2018

  • bpo-31479: Always reset the signal alarm in tests

Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.

  • Move two more alarm() calls into the try block

Fix also typo: replace signal.signal(0) with signal.alarm(0)

  • Move another signal.alarm() into the try block

(cherry picked from commit 9abee72)

https://bugs.python.org/issue31479

* bpo-31479: Always reset the signal alarm in tests

Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.

* Move two more alarm() calls into the try block

Fix also typo: replace signal.signal(0) with signal.alarm(0)

* Move another signal.alarm() into the try block

(cherry picked from commit 9abee72)
@vstinner vstinner merged commit 3604b23 into python:2.7 Jun 1, 2018
@vstinner vstinner deleted the reset_alarm27 branch June 1, 2018 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants