def set_process_name(name):
from ctypes import cdll, byref, create_string_buffer
# This is nice to have for debugging, not essential
try:
libc = cdll.LoadLibrary('libc.so.6')
buf = create_string_buffer(bytes(name, 'utf-8'))
libc.prctl(15, byref(buf), 0, 0, 0)
except:
pass
# export common proxies variables from datastore to environment
评论列表
文章目录