Skip to content

bpo-31731: Fix test_io.check_interrupted_write()#11225

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:test_io
Dec 18, 2018
Merged

bpo-31731: Fix test_io.check_interrupted_write()#11225
vstinner merged 1 commit into
python:masterfrom
vstinner:test_io

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Dec 18, 2018

Fix a possible race condition in check_interrupted_write() of
test_io: create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.

https://bugs.python.org/issue31731

Fix a possible race condition in check_interrupted_write() of
test_io: create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link
Copy Markdown

GH-11226 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 18, 2018
Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
miss-islington added a commit that referenced this pull request Dec 18, 2018
Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants