Yet another fix for the proccess renaming

This commit is contained in:
red-agent 2009-10-05 19:19:03 +03:00
parent 60bb2d0bdd
commit 8d663c31c5
1 changed files with 5 additions and 1 deletions

View File

@ -165,9 +165,13 @@ else:
sysname = platform.system()
libc = CDLL(find_library('c'))
# The constant defined in <linux/prctl.h> which is used to set the name of
# the process.
PR_SET_NAME = 15
if sysname == 'Linux':
libc.prctl(15, 'gajim', 0, 0, 0)
libc.prctl(PR_SET_NAME, 'gajim')
elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
libc.setproctitle('gajim')