[oe-commits] [bitbake] 01/02: lib/bb/utils: fix set_process_name
git at git.openembedded.org
git at git.openembedded.org
Tue Jul 19 07:47:57 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit 6576a9a95486c28a01d4211b4a33cc3e2c55a7cc
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Jul 12 16:14:25 2016 +0100
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 ]
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/utils.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 0a1bf68..3bc2437 100644
--- a/lib/bb/utils.py
+++ b/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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list