<div>urllib2.py is crashes when calling randombytes(n). I run the following under Cygwin (mimicking how randombytes works):</div><div><br></div><div><div>$ python</div><div>Python 2.5.2 (r252:60911, Dec 2 2008, 09:26:14)</div>
<div>[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin</div><div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> import sys,os</div>
<div>>>> os.path.exists("/dev/urandom")</div><div>True</div><div>>>> f = open("/dev/urandom")</div><div>>>> s = f.read(2)</div><div>>>> f.close()</div><div>Traceback (most recent call last):</div>
<div> File "<stdin>", line 1, in <module></div><div>IOError: [Errno 0] Error</div></div><div><br></div><div><br></div><div>Errno 0 is supposed to be impossible according to the following thread. Apparently this same issue also causes Mercurial to crash:</div>
<div><a href="http://www.nabble.com/hg-1.0-exits-with-abort:-Error-td19021833.html">http://www.nabble.com/hg-1.0-exits-with-abort:-Error-td19021833.html</a></div><div><br></div><div><br></div><div>Is this a bug?</div><div>
<br></div><div><br></div><div>--</div><div>Jeremy</div>