def _set_prctl_name(process_name):
 libc = ctypes.CDLL(ctypes.util.find_library('c'))
 name_buffer = ctypes.create_string_buffer((len(process_name) + 1))
 name_buffer.value = stem.util.str_tools._to_bytes(process_name)
 libc.prctl(PR_SET_NAME, ctypes.byref(name_buffer), 0, 0, 0)

def _set_prctl_name ( process_name ) : libc = ctypes . CDLL ( ctypes . util . find_library ( 'c' ) ) name_buffer = ctypes . create_string_buffer ( ( len ( process_name ) + 1 ) ) name_buffer . value = stem . util . str_tools . _to_bytes ( process_name ) libc . prctl ( PR_SET_NAME , ctypes . byref ( name_buffer ) , 0 , 0 , 0 )
sets the prctl name .