Re: [PyQt] [Errno 4] Interrupted system call

2007-05-28 Thread Arve Knudsen

Aha, so Ubuntu's version _is_ patched :)

Arve

On 5/28/07, Ismail Dönmez <[EMAIL PROTECTED]> wrote:


On Monday 28 May 2007 18:54:47 Jeremy Moskovich wrote:
> Hi,
> I'm having consistent problems using the python subprocess module in
> PyQT applications.
>
> os.read() & os.wait() calls seem to be interrupted intermittently, in a
> manner similar to the following stack trace:
>
> File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
> line 593, in __init__
> errread, errwrite)
> File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
> line 1046, in _execute_child
> data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
> OSError: [Errno 4] Interrupted system call
>
> The only mention I could find about this online is at:
> http://mail.python.org/pipermail/python-list/2007-February/427031.html
> which just recommends retrying the operation.
>
> Does anyone know what the root of this problem is? How can it be solved
> effectively

You might want to try the following patch
http://librarian.launchpad.net/6820347/subprocess-eintr-safety.patch . The
bug report is @

http://sourceforge.net/tracker/index.php?func=detail&aid=1068268&group_id=5470&atid=105470


/ismail

--
Perfect is the enemy of good

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] [Errno 4] Interrupted system call

2007-05-28 Thread Ismail Dönmez
On Monday 28 May 2007 18:54:47 Jeremy Moskovich wrote:
> Hi,
> I'm having consistent problems using the python subprocess module in
> PyQT applications.
>
> os.read() & os.wait() calls seem to be interrupted intermittently, in a
> manner similar to the following stack trace:
>
> File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
> line 593, in __init__
> errread, errwrite)
> File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
> line 1046, in _execute_child
> data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
> OSError: [Errno 4] Interrupted system call
>
> The only mention I could find about this online is at:
> http://mail.python.org/pipermail/python-list/2007-February/427031.html
> which just recommends retrying the operation.
>
> Does anyone know what the root of this problem is? How can it be solved
> effectively

You might want to try the following patch  
http://librarian.launchpad.net/6820347/subprocess-eintr-safety.patch . The 
bug report is @ 
http://sourceforge.net/tracker/index.php?func=detail&aid=1068268&group_id=5470&atid=105470


/ismail

-- 
Perfect is the enemy of good


signature.asc
Description: This is a digitally signed message part.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] [Errno 4] Interrupted system call

2007-05-28 Thread Arve Knudsen

Hi Jeremy

On 5/28/07, Jeremy Moskovich <[EMAIL PROTECTED]> wrote:


Hi,
I'm having consistent problems using the python subprocess module in
PyQT applications.

os.read() & os.wait() calls seem to be interrupted intermittently, in a
manner similar to the following stack trace:

File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
line 593, in __init__
errread, errwrite)
File "/homes/jeremym/programs/python2.5/lib/python2.5/subprocess.py",
line 1046, in _execute_child
data = os.read(errpipe_read, 1048576) # Exceptions limited to 1 MB
OSError: [Errno 4] Interrupted system call

The only mention I could find about this online is at:
http://mail.python.org/pipermail/python-list/2007-February/427031.html
which just recommends retrying the operation.



I've never experienced an interruption during the construction of a Popen
object, which seems to be the case here. Calls to Popen.wait, on the
other hand,
did get interrupted all the time on OS X (no idea why), so I had to catch
EINTR and retry. Are you using the very latest Python though? I have version
2.5.1 on Ubuntu, and from browsing subprocess.py I see that os.read is now
wrapped, so that the operation is always retried upon EINTR.

Hope this helps,
Arve
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt