[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-19 Thread STINNER Victor
STINNER Victor added the comment: > I can reproduce the issue on Linux: Sorry, I forgot to mention that I reproduced the issue on Fedora 20 with Python 2.7. I cannot reproduce with Python 3.3. -- ___ Python tracker

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread STINNER Victor
STINNER Victor added the comment: I can reproduce the issue on Linux: Traceback (most recent call last): File "x.py", line 26, in f.write('starting program: {}\n'.format(program)) IOError: [Errno 4] Interrupted system call -- ___ Python tracke

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread Jonathan Stewmon
Jonathan Stewmon added the comment: Sorry, I had a typo in the original report - I am actually using Python 2.7.7 installed with homebrew. The script crashes for me on the first iteration every time using iTerm as my terminal. I just tried it in Terminal, and it doesn't crash. Maybe it's actu

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread Ned Deily
Ned Deily added the comment: Yes, an issue not likely to be addressed in Python 2.7. I'm still curious as to why I'm not able to reproduce the problem, though. I suppose it could just come down to differences in the system it is running on, like workload, amount of memory, and/or number of p

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread STINNER Victor
STINNER Victor added the comment: This issue is just an example of issue addressed by the issue #18885. -- nosy: +haypo ___ Python tracker ___ ___

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread Ned Deily
Ned Deily added the comment: There have been a number of EINTR-releated issues reported in the past, some unique to BSD-based systems and/or OS X; see for example, Issue9867 and Issue12268. I don't know that any of them specifically addressed problems with writes to Python 2 file objects. FW

[issue22007] sys.stdout.write on OS X is not EINTR safe

2014-07-18 Thread Jonathan Stewmon
New submission from Jonathan Stewmon: Writing to sys.stdout on OS X can fail with IOError: [Errno 4] Interrupted system call. I have observed this while trying to write to sys.stdout when SIGCHLD is received. The script below consistently reproduces the problem with python 2.7.2 on OS X 10.9.