Skip to content

Commit

Permalink
Missed a 'shell=True' in #216.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaycedowell authored Aug 28, 2023
1 parent 77eb32e commit 5a93e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/like_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_process_details(pid):

data = {'user':'', 'cpu':0.0, 'mem':0.0, 'etime':'00:00', 'threads':0}
try:
output = subprocess.check_output(f"ps o user,pcpu,pmem,etime,nlwp {pid}", shell=True)
output = subprocess.check_output(['ps', 'o', 'user,pcpu,pmem,etime,nlwp', str(pid)])
output = output.decode()
output = output.split('\n')[1]
fields = output.split(None, 4)
Expand Down

0 comments on commit 5a93e5d

Please sign in to comment.