projects
/
theonering
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Adding quit, update_now. Fixing reset_state_machine
[theonering]
/
src
/
util
/
linux.py
1
#!/usr/bin/env python
2
3
4
import logging
5
6
7
def set_process_name(name):
8
try: # change process name for killall
9
import ctypes
10
libc = ctypes.CDLL('libc.so.6')
11
libc.prctl(15, name, 0, 0, 0)
12
except Exception, e:
13
logging.warning('Unable to set processName: %s" % e')