Annotation of pkgsrc/lang/python27/patches/patch-Lib_multiprocessing_process.py, revision 1.1
1.1 ! ryoon 1: $NetBSD$
! 2:
! 3: --- Lib/multiprocessing/process.py.orig 2014-06-30 02:05:29.000000000 +0000
! 4: +++ Lib/multiprocessing/process.py
! 5: @@ -306,7 +306,15 @@ class _MainProcess(Process):
! 6: self._popen = None
! 7: self._counter = itertools.count(1)
! 8: self._children = set()
! 9: - self._authkey = AuthenticationString(os.urandom(32))
! 10: + # Get randomness from urandom or the 'random' module.
! 11: + # from http://bugs.python.org/issue6645
! 12: + # for SCO OpenServer 5.0.7/3.2 and AIX
! 13: + try:
! 14: + self._authkey = AuthenticationString(os.urandom(32))
! 15: + except:
! 16: + import random
! 17: + bytes = [chr(random.randrange(256)) for i in range(32)]
! 18: + self._authkey = AuthenticationString(bytes)
! 19: self._tempdir = None
! 20:
! 21: _current_process = _MainProcess()
CVSweb <webmaster@jp.NetBSD.org>