[pypy-issue] [issue1349] input+thread+readline = signal crash

Irmen de Jong tracker at bugs.pypy.org
Sun Dec 16 19:45:06 CET 2012

New submission from Irmen de Jong <irmen at razorvine.net>:

Using Pypy 1.9.0. Importing readline. Using a background thread to get input()
from stdin. It then crashes with:

  File "/usr/local/Cellar/pypy/1.9/lib_pypy/pyrepl/unix_console.py", line 400,
in restore
    signal.signal(signal.SIGWINCH, self.old_sigwinch)
ValueError: signal() must be called from the main thread

Anyone seen this before? What's going on?
When I don't import readline, or do the input() from within the main thread, the
problem disappears.

(I tried to reproduce it in a small test scenario but unfortunately have not
been able to do so yet. Haven't figured out yet what the additional factors are
that trigger this problem. A simple import readline and input() from a new
thread doesn't seem to trigger it, unfortunately)

messages: 5081
nosy: irmen, pypy-issue
priority: bug
release: 1.9
status: unread
title: input+thread+readline = signal crash

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list