Yet another fix for the proccess renaming
This commit is contained in:
		
							parent
							
								
									60bb2d0bdd
								
							
						
					
					
						commit
						8d663c31c5
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -166,8 +166,12 @@ else:
 | 
				
			||||||
	sysname = platform.system()
 | 
						sysname = platform.system()
 | 
				
			||||||
	libc = CDLL(find_library('c'))
 | 
						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':
 | 
						if sysname == 'Linux':
 | 
				
			||||||
		libc.prctl(15, 'gajim', 0, 0, 0)
 | 
							libc.prctl(PR_SET_NAME, 'gajim')
 | 
				
			||||||
	elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
 | 
						elif sysname in ('FreeBSD', 'OpenBSD', 'NetBSD'):
 | 
				
			||||||
		libc.setproctitle('gajim')
 | 
							libc.setproctitle('gajim')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue