summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r--bitbake/lib/bb/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index fc389a3e2c..77ad39ee86 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -26,6 +26,7 @@ import logging
26import bb 26import bb
27import bb.msg 27import bb.msg
28import multiprocessing 28import multiprocessing
29import fcntl
29from commands import getstatusoutput 30from commands import getstatusoutput
30from contextlib import contextmanager 31from contextlib import contextmanager
31 32
@@ -754,3 +755,7 @@ def contains(variable, checkvalues, truevalue, falsevalue, d):
754 755
755def cpu_count(): 756def cpu_count():
756 return multiprocessing.cpu_count() 757 return multiprocessing.cpu_count()
758
759def nonblockingfd(fd):
760 fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)
761