[pypy-commit] pypy default: Before resetting SIGALRM, use alarm(0) to make sure pending alarms are cancelled
arigo
pypy.commits at gmail.com
Fri Dec 18 11:49:56 EST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r81380:10def85dd7bc
Date: 2015-12-18 17:49 +0100
http://bitbucket.org/pypy/pypy/changeset/10def85dd7bc/
Log: Before resetting SIGALRM, use alarm(0) to make sure pending alarms
are cancelled
diff --git a/rpython/rlib/test/test_streamio.py b/rpython/rlib/test/test_streamio.py
--- a/rpython/rlib/test/test_streamio.py
+++ b/rpython/rlib/test/test_streamio.py
@@ -1077,6 +1077,7 @@
alarm(1)
assert file.read(10) == "hello"
finally:
+ alarm(0)
signal(SIGALRM, SIG_DFL)
def test_write_interrupted(self):
@@ -1102,6 +1103,7 @@
# can succeed.
file.write("hello")
finally:
+ alarm(0)
signal(SIGALRM, SIG_DFL)
def test_append_mode(self):
More information about the pypy-commit
mailing list