diff --git a/Lib/multiprocessing/__init__.py b/Lib/multiprocessing/__init__.py index f96505630ae..10be01a6ba6 100644 --- a/Lib/multiprocessing/__init__.py +++ b/Lib/multiprocessing/__init__.py @@ -113,7 +113,7 @@ def cpu_count(): num = int(os.environ['NUMBER_OF_PROCESSORS']) except (ValueError, KeyError): num = 0 - elif sys.platform == 'darwin': + elif 'bsd' in sys.platform or sys.platform == 'darwin': try: num = int(os.popen('sysctl -n hw.ncpu').read()) except ValueError: