summaryrefslogtreecommitdiffstats
path: root/lib/bb/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r--lib/bb/build.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 948c3951f..22428a649 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -413,6 +413,13 @@ def _exec_task(fn, task, d, quieterr):
nice = int(nice) - curnice
newnice = os.nice(nice)
logger.debug(1, "Renice to %s " % newnice)
+ ionice = localdata.getVar("BB_TASK_IONICE_LEVEL", True)
+ if ionice:
+ try:
+ cls, prio = ionice.split(".", 1)
+ bb.utils.ioprio_set(os.getpid(), int(cls), int(prio))
+ except:
+ bb.warn("Invalid ionice level %s" % ionice)
bb.utils.mkdirhier(tempdir)