Commit 967f7a40 authored by Yann Leboulanger's avatar Yann Leboulanger

correctly set process name. Fixes #9034

parent cfbb14fe
......@@ -218,7 +218,7 @@ def _startup(self, application):
if Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL:
i18n.direction_mark = '\u200F'
from ctypes import CDLL
from ctypes import CDLL, byref, create_string_buffer
from ctypes.util import find_library
import platform
......@@ -231,7 +231,10 @@ def _startup(self, application):
PR_SET_NAME = 15
if sysname == 'Linux':
libc.prctl(PR_SET_NAME, 'gajim')
proc_name = b'gajim'
buff = create_string_buffer(len(proc_name)+1)
buff.value = proc_name
libc.prctl(PR_SET_NAME, byref(buff), 0, 0, 0)
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
libc.setproctitle('gajim')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment