def _set_proc_title(process_name):
 libc = ctypes.CDLL(ctypes.util.find_library('c'))
 name_buffer = ctypes.create_string_buffer((len(process_name) + 1))
 name_buffer.value = process_name
 try:
  libc.setproctitle(ctypes.byref(name_buffer))
 except AttributeError:
  pass

def _set_proc_title ( process_name ) : libc = ctypes . CDLL ( ctypes . util . find_library ( 'c' ) ) name_buffer = ctypes . create_string_buffer ( ( len ( process_name ) + 1 ) ) name_buffer . value = process_name try : libc . setproctitle ( ctypes . byref ( name_buffer ) ) except AttributeError : pass
bsd specific calls (should be compataible with both freebsd and openbsd: URL URL .