pkgsrc/lang/python27/patches/patch-Lib_multiprocessing_process.py
rodent b62fc57072 Add patch from: https://hg.python.org/cpython/rev/eddcb6671a48 to fix build
with LibreSSL and stop our OpenBSD bulk builds from being murdered. Defuzz
patches.
2015-04-24 03:01:35 +00:00

21 lines
890 B
Python

$NetBSD: patch-Lib_multiprocessing_process.py,v 1.2 2015/04/24 03:01:36 rodent Exp $
--- Lib/multiprocessing/process.py.orig 2014-12-10 15:59:39.000000000 +0000
+++ Lib/multiprocessing/process.py
@@ -306,7 +306,15 @@ class _MainProcess(Process):
self._popen = None
self._counter = itertools.count(1)
self._children = set()
- self._authkey = AuthenticationString(os.urandom(32))
+ # Get randomness from urandom or the 'random' module.
+ # from http://bugs.python.org/issue6645
+ # for SCO OpenServer 5.0.7/3.2 and AIX
+ try:
+ self._authkey = AuthenticationString(os.urandom(32))
+ except:
+ import random
+ bytes = [chr(random.randrange(256)) for i in range(32)]
+ self._authkey = AuthenticationString(bytes)
self._tempdir = None
_current_process = _MainProcess()