diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/utils.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 608aff8ad7..bd643ea767 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py | |||
@@ -1724,7 +1724,7 @@ class runQueuePipe(): | |||
1724 | def __init__(self, pipein, pipeout, d): | 1724 | def __init__(self, pipein, pipeout, d): |
1725 | self.input = pipein | 1725 | self.input = pipein |
1726 | pipeout.close() | 1726 | pipeout.close() |
1727 | fcntl.fcntl(self.input, fcntl.F_SETFL, fcntl.fcntl(self.input, fcntl.F_GETFL) | os.O_NONBLOCK) | 1727 | bb.utils.nonblockingfd(self.input) |
1728 | self.queue = "" | 1728 | self.queue = "" |
1729 | self.d = d | 1729 | self.d = d |
1730 | 1730 | ||
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 | |||
26 | import bb | 26 | import bb |
27 | import bb.msg | 27 | import bb.msg |
28 | import multiprocessing | 28 | import multiprocessing |
29 | import fcntl | ||
29 | from commands import getstatusoutput | 30 | from commands import getstatusoutput |
30 | from contextlib import contextmanager | 31 | from contextlib import contextmanager |
31 | 32 | ||
@@ -754,3 +755,7 @@ def contains(variable, checkvalues, truevalue, falsevalue, d): | |||
754 | 755 | ||
755 | def cpu_count(): | 756 | def cpu_count(): |
756 | return multiprocessing.cpu_count() | 757 | return multiprocessing.cpu_count() |
758 | |||
759 | def nonblockingfd(fd): | ||
760 | fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK) | ||
761 | |||