Message170238
| Author |
neologix |
| Recipients |
Denis.Bilenko, neologix, vitaly |
| Date |
2012年09月10日.21:19:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<CAH_1eM2BpH7MJcfgqd3DcvwCwpxhwiATb7VmcG26TaZUdo5+2w@mail.gmail.com> |
| In-reply-to |
<1347307794.95.0.475369174532.issue15896@psf.upfronthosting.co.za> |
| Content |
> 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. |
|