Robert Kern wrote:
> On 2009-11-12 12:05 PM, Andrew Straw wrote:
>   
>> Celil Rufat wrote:
>>     
>>> I just installed matplotlib on Snow Leopard 10.6 with the Qt4 backend
>>> (via macports). However, when I try one of the Qt4 examles:
>>>
>>> python
>>> /opt/local/share/py26-matplotlib/examples/user_interfaces/embedding_in_qt4.py
>>>
>>>
>>> IOError: [Errno 4] Interrupted system call
>>>
>>> Any ideas on what could be causing this?
>>>       
>> Out of curiosity, does anyone know where the signal interrupting the
>> system call is originating? Is this a standard communication mechanism
>> within Qt4? (I have never used Qt4.) I'm interested in knowing about OSS
>> that use signals as a means of across-thread or across-process
>> communication.
>>     
>
> This problem arises when signal handlers are installed, not necessarily when 
> a 
> signal itself is sent (dtrace doesn't detect any).
Hmm, but a system call isn't going to get interrupted and return EINTR 
by any means other than a signal. So the OP must have had a signal 
interrupting the call and it must have come from somewhere. Or... am I 
wrong?

>  PyQt4 doesn't do it, but I 
> think something in QApplication does. I really don't know what, though. Here 
> are 
> the files that call signal(3) or sigaction(3):
>
> ./src/3rdparty/freetype/src/tools/ftrandom/ftrandom.c
> ./src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
> ./src/3rdparty/sqlite/shell.c
> ./src/3rdparty/webkit/JavaScriptCore/jsc.cpp
> ./src/corelib/io/qfilesystemwatcher_dnotify.cpp
> ./src/corelib/io/qprocess_unix.cpp
> ./src/corelib/kernel/qcrashhandler.cpp
> ./src/corelib/kernel/qeventdispatcher_unix.cpp
> ./src/gui/embedded/qwindowsystem_qws.cpp
> ./src/gui/embedded/qwssignalhandler.cpp
> ./tools/qvfb/main.cpp
>
> It's not obvious to me that any of these are activated on OS X (the 
> qcrashhandler.cpp file is intriguing, but it only seems to be used in the X11 
> QApplication). dtrace doesn't actually show either signal(3) or sigaction(3) 
> being called at all. Actually, running a program under dtrace while probing 
> those functions makes the problem go away. Sometimes.
>   
Ahh, a fun Heisenbug. OK, well if I decide to look for programs that use 
signals as a means of communication, I'll investigate Qt further.

I asked because there's a proprietary library I'm forced to use that 
does communicate internally with signals. It's a real pain, however, 
because it means anything else in that process also gets hit with 
signals and so system calls must be EINTR safe.

-Andrew

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to