mirror of
https://github.com/pulb/mailnag.git
synced 2026-01-27 07:29:02 +01:00
migrated to gintrospection (partially) set process names to mailnag and mailnag_config moved keyring class to its own module added utils module other changes i don't remember
7 lines
224 B
Python
7 lines
224 B
Python
def set_procname(newname):
|
|
from ctypes import cdll, byref, create_string_buffer
|
|
libc = cdll.LoadLibrary('libc.so.6')
|
|
buff = create_string_buffer(len(newname)+1)
|
|
buff.value = newname
|
|
libc.prctl(15, byref(buff), 0, 0, 0)
|