IOError: [Errno 4] Interrupted system call
Gabriel Genellina
gagsl-py at yahoo.com.ar
Thu Feb 15 22:44:14 EST 2007
En Thu, 15 Feb 2007 23:57:29 -0300, <chadrik at gmail.com> escribió:
> i'm getting the same error when trying to read results from popen2
> within a pyQt window. is this a threading issue? is my pyQt window
> responsible for interrupting the read? i'm fairly new to python so
> i'm struggling to figure this out. can you recommend any possible
> methods of preventing this? for instance, could acquiring a thread
> lock before calling popen solve the problem?
I dont know pyQt but in general, blocking operations (like a syncronous
read) can return EINTR when a signal arrives in the middle. Just retrying
the operation would be enough; by example, if you have a read() inside a
loop, just ignore the exception and continue.
--
Gabriel Genellina
More information about the Python-list
mailing list