summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-07-12 16:14:25 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-19 08:47:06 +0100
commitb7a741cbca043cc17b7e9798531813c932f5c103 (patch)
tree64a3b84ec7469e7d7d0ac66d9469c3b06977ad77 /bitbake/lib/bb
parent627d01997fcf6a0581d88047735769ffb2592b82 (diff)
downloadpoky-b7a741cbca043cc17b7e9798531813c932f5c103.tar.gz
bitbake: lib/bb/utils: fix set_process_name
With Python 3 create_string_buffer needs a bytes() not a str() but as we were catching all exceptions nobody noticed. [ YOCTO #9910 ] (Bitbake rev: 6576a9a95486c28a01d4211b4a33cc3e2c55a7cc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/utils.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 0a1bf6880a..3bc243723b 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1444,9 +1444,8 @@ def set_process_name(name):
1444 # This is nice to have for debugging, not essential 1444 # This is nice to have for debugging, not essential
1445 try: 1445 try:
1446 libc = cdll.LoadLibrary('libc.so.6') 1446 libc = cdll.LoadLibrary('libc.so.6')
1447 buff = create_string_buffer(len(name)+1) 1447 buf = create_string_buffer(bytes(name, 'utf-8'))
1448 buff.value = name 1448 libc.prctl(15, byref(buf), 0, 0, 0)
1449 libc.prctl(15, byref(buff), 0, 0, 0)
1450 except: 1449 except:
1451 pass 1450 pass
1452 1451