Annotation of pkgsrc/lang/python27/patches/patch-Lib_multiprocessing_process.py, revision 1.2

1.2     ! rodent      1: $NetBSD: patch-Lib_multiprocessing_process.py,v 1.1 2014/07/17 15:26:49 ryoon Exp $
1.1       ryoon       2: 
1.2     ! rodent      3: --- Lib/multiprocessing/process.py.orig        2014-12-10 15:59:39.000000000 +0000
1.1       ryoon       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>