mirror of
https://github.com/Rudd-O/ansible-qubes.git
synced 2025-03-01 14:22:33 +01:00
Fix encoding error.
This commit is contained in:
parent
f84379bb33
commit
920805a8fd
@ -35,6 +35,8 @@ PACKFORMAT = "!HbIx"
|
||||
def set_proc_name(newname):
|
||||
from ctypes import cdll, byref, create_string_buffer
|
||||
|
||||
if isinstance(newname, str):
|
||||
newname = newname.encode("utf-8")
|
||||
libc = cdll.LoadLibrary("libc.so.6")
|
||||
buff = create_string_buffer(len(newname) + 1)
|
||||
buff.value = newname
|
||||
|
Loading…
x
Reference in New Issue
Block a user