Commit 0f13b23a authored by Yann Leboulanger's avatar Yann Leboulanger

correctly set process name. Fixes #9034

parent e326aabf
......@@ -217,7 +217,7 @@ class GajimApplication(Gtk.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
......@@ -230,7 +230,10 @@ class GajimApplication(Gtk.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