diff options
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 9a3efb25de..ae10213ed7 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -1395,3 +1395,14 @@ def ioprio_set(who, cls, value): | |||
1395 | raise ValueError("Unable to set ioprio, syscall returned %s" % rc) | 1395 | raise ValueError("Unable to set ioprio, syscall returned %s" % rc) |
1396 | else: | 1396 | else: |
1397 | bb.warn("Unable to set IO Prio for arch %s" % _unamearch) | 1397 | bb.warn("Unable to set IO Prio for arch %s" % _unamearch) |
1398 | |||
1399 | def set_process_name(name): | ||
1400 | from ctypes import cdll, byref, create_string_buffer | ||
1401 | # This is nice to have for debugging, not essential | ||
1402 | try: | ||
1403 | libc = cdll.LoadLibrary('libc.so.6') | ||
1404 | buff = create_string_buffer(len(name)+1) | ||
1405 | buff.value = name | ||
1406 | libc.prctl(15, byref(buff), 0, 0, 0) | ||
1407 | except: | ||
1408 | pass | ||