Mercurial > hg > config
comparison python/process.py @ 182:f9863f733344
fix up a bit
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 08 Nov 2011 19:05:21 -0800 |
parents | f52486ceadee |
children | 748c232c0af3 |
comparison
equal
deleted
inserted
replaced
181:7f594703d75e | 182:f9863f733344 |
---|---|
24 retval.append(process_dict) | 24 retval.append(process_dict) |
25 return retval | 25 return retval |
26 | 26 |
27 def running_processes(name, defunct=True): | 27 def running_processes(name, defunct=True): |
28 """ | 28 """ |
29 returns a list of | 29 returns a list of 2-tuples of running processes: |
30 {'PID': PID of process (int) | 30 (pid, ['path/to/executable', 'args', '...']) |
31 'command': command line of process (list)} | |
32 with the executable named `name`. | 31 with the executable named `name`. |
33 - defunct: whether to return defunct processes | 32 - defunct: whether to return defunct processes |
34 """ | 33 """ |
35 retval = [] | 34 retval = [] |
36 for process in ps(): | 35 for process in ps(): |