From b7a741cbca043cc17b7e9798531813c932f5c103 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 12 Jul 2016 16:14:25 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb') 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): # This is nice to have for debugging, not essential try: libc = cdll.LoadLibrary('libc.so.6') - buff = create_string_buffer(len(name)+1) - buff.value = name - libc.prctl(15, byref(buff), 0, 0, 0) + buf = create_string_buffer(bytes(name, 'utf-8')) + libc.prctl(15, byref(buf), 0, 0, 0) except: pass -- cgit v1.2.3-54-g00ecf