Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > need some help with unexpected signal exception when using inputfrom a thread (Pypy 1.9.0 on osx/linux)

Reply
Thread Tools

need some help with unexpected signal exception when using inputfrom a thread (Pypy 1.9.0 on osx/linux)

 
 
Irmen de Jong
Guest
Posts: n/a
 
      12-15-2012
Hi.
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)


Regards
Irmen de Jong
 
Reply With Quote
 
 
 
 
Dieter Maurer
Guest
Posts: n/a
 
      12-16-2012
Irmen de Jong <(E-Mail Removed)> writes:

> 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?


Apparently, "input" is not apt to be called from a "background thread".

I have no idea why "signal" should only be callable from the main thread.
I do not think this makes much sense. Speak with the "Pypy" developers
about this.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2.0: unexpected exception "Thread was being aborted" R.A.M. ASP .Net 4 05-19-2006 04:11 PM
threading.Thread vs. signal.signal Jack Orenstein Python 0 09-17-2005 11:24 PM
IBM JVM java cores with Unexpected signal C B Java 1 08-05-2004 05:07 AM
Unexpected Signal : 11 Swasil Java 2 01-12-2004 11:58 AM
unexpected exception when using JNI James Ly Java 3 12-03-2003 05:46 PM



Advertisments