[pypy-issue] [issue1349] input+thread+readline = signal crash
Amaury Forgeot d Arc
tracker at bugs.pypy.org
Tue Dec 18 12:12:20 CET 2012
Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:
Oh, this happens when input() is called from the main thread, and afterwards from a spawned
thread. The patch below seems to fix the issue.
Don't call input() from both threads at the same time, though; this UnixConsole is
absolutely not thread-safe anyway.
--- a/lib_pypy/pyrepl/unix_console.py Sat Dec 15 16:35:08 2012 +0100
+++ b/lib_pypy/pyrepl/unix_console.py Tue Dec 18 12:08:50 2012 +0100
@@ -398,6 +398,7 @@
if hasattr(self, 'old_sigwinch'):
signal.signal(signal.SIGWINCH, self.old_sigwinch)
+ del self.old_sigwinch
def __sigwinch(self, signum, frame):
self.height, self.width = self.getheightwidth()
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1349>
________________________________________
More information about the pypy-issue
mailing list