Skip to content
Snippets Groups Projects
Commit 967f7a40 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

correctly set process name. Fixes #9034

parent cfbb14fe
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,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
......@@ -231,7 +231,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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment