[pypy-dev] Dead loop occurs when using python-daemon and multiprocessing together in PyPy 4.0.1
arigo at tunes.org
Thu Dec 24 14:28:53 EST 2015
On Thu, Dec 24, 2015 at 5:50 PM, Vincent Legoll
<vincent.legoll at gmail.com> wrote:
> Are we really seeing a closed and reopened fd ?
> And if that's the case it may even be intentional ;-)
> because if we're only seeing a closed python file object, we could go
> the simpler way:
> - if not context:
> + if (not context or
> + type(context) == file and context.closed):
> context = os.open("/dev/urandom", os.O_RDONLY, 0777)
> I'll try to reproduce first then test if this simple fix is enough...
No, please don't commit "half fixes" like that. We know that there is
a situation in which bad things occurs, so we need to deal with it.
Fixing half the problem might make this particular case work, but not
all of them. At least the current situation is not very good
performance-wise but should work.
More information about the pypy-dev