Charles-François Natali added the comment: > 1. Reduce the initial read size argument (rSize in my code snippet) from > 1048576 (1MB, the same amount as used by subprocess.Popen._executeChild) to > 1000000: the problem appears to go away (could be just red herring, though); > this actually makes me think that it's a Python implementation problem on > MacOS - why should an initial read request with 1048576 read size trigger > EINVAL every other time (1,3,5,9, etc.), but using the initial size of > 1000000 doesn't?
That's not a Python issue. os.read() juste calls the read() syscall, nothing more. Failing with EBADF could maybe have an explanation if we endup up calling read() on a closed FD, but nothing can explain EINVAL. We've had many cases of strange OS-X bugs, like this one (EINVAL too): http://bugs.python.org/issue15594 One last thing I'd like to make sure of, is trying to put a delay before reading the exception from the pipe. There may be cases where read() returns EINVAL instead of EAGAIN when there's no data in the pipe. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15896> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com