summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2008-11-28 18:59:35 (GMT)
committerJesse Noller <jnoller@gmail.com>2008-11-28 18:59:35 (GMT)
commit1f8b49f517bb97365f1848c308ef464fa5c54126 (patch)
treec6a9de4382aca00d38a4676ca3beb64fd5d031d9
parenta280fd72e78d7bf4bb4324a22dbbb4fa32b1aca2 (diff)
downloadcpython-1f8b49f517bb97365f1848c308ef464fa5c54126.zip
cpython-1f8b49f517bb97365f1848c308ef464fa5c54126.tar.gz
cpython-1f8b49f517bb97365f1848c308ef464fa5c54126.tar.bz2
issue4238: bsd support for cpu_count
-rw-r--r--Lib/multiprocessing/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/multiprocessing/__init__.py b/Lib/multiprocessing/__init__.py
index f965056..10be01a 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: