COMMENT: How to make process_running() to include process parameters.
git-svn-id: http://www.neo1973-germany.de/svn@59 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
a079e81ea5
commit
12551ae94f
1 changed files with 7 additions and 0 deletions
|
@ -282,6 +282,13 @@ class ProcessInterface:
|
||||||
|
|
||||||
|
|
||||||
def process_running(name):
|
def process_running(name):
|
||||||
|
'''
|
||||||
|
name can be any string from the commandline to hit.
|
||||||
|
Parameters are seperated using the '\0' caracter.
|
||||||
|
|
||||||
|
Example: to search for 'su -' use:
|
||||||
|
process_running("su\0-")
|
||||||
|
'''
|
||||||
if not os.path.exists("/proc"):
|
if not os.path.exists("/proc"):
|
||||||
return False
|
return False
|
||||||
for key in os.listdir("/proc"):
|
for key in os.listdir("/proc"):
|
||||||
|
|
Loading…
Reference in a new issue