Hello and happy new pypyear to all pypyers ! On Tue, Jan 5, 2016 at 10:13 AM, Armin Rigo <ar...@tunes.org> wrote:
>> So to stay on the safe side, you prefer to keep reopening every time ? >> https://bitbucket.org/vincentlegoll/pypy/commits/branch/fix-urandom-closed > > I'm not against a proper fix :-) The problem is that for the fix to > be proper, it needs a bit more work than what you did. The problem is > that the calls to os.fstat() in your code can each release the GIL; in > CPython, the corresponding calls to fstat() are done without the GIL > released, and I believe it is important. OK for a proper fix, how can we write a test that will check for that ? Is there a doc for pypy's way to grab the GIL ? BTW, in the always open()ing, isn't the race still there, because the GIL is released between open() and read(), no ? So the fd can be closed here too... That could certainly be a smaller gap, but still... -- Vincent Legoll _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev