def renameProcess(new_name):
 if (sys.platform != 'linux2'):
  return False
 try:
  from ctypes import CDLL
  libc = CDLL('libc.so.6')
  libc.prctl(15, new_name, 0, 0, 0)
  return True
 except Exception as e:
  return False

def renameProcess ( new_name ) : if ( sys . platform != 'linux2' ) : return False try : from ctypes import CDLL libc = CDLL ( 'libc.so.6' ) libc . prctl ( 15 , new_name , 0 , 0 , 0 ) return True except Exception as e : return False
renames the process calling the function to the given name .