diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-22 12:53:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-25 14:57:16 +0100 |
commit | be98c1fc299a3e5355e1d864c9a3f5d1fdf21d9c (patch) | |
tree | 90309fe23922818132270951bff8007832fe8100 /bitbake/lib/bb/utils.py | |
parent | e05b423cc6f9f5193fecc605efc2ad47170fd0c6 (diff) | |
download | poky-be98c1fc299a3e5355e1d864c9a3f5d1fdf21d9c.tar.gz |
bitbake: utils.py: Add function to set nonblocking operation on a file descriptor
(Bitbake rev: ab6d71ebfcfb7bedc064b25f84647c8815096e5a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 5 |
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 | |||
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 | |||