fix output
This commit is contained in:
parent
4fa93e71cf
commit
67d9c3295e
4
nohang
4
nohang
@ -337,7 +337,7 @@ def pid_to_ancestry(pid, max_ancestry_depth=1):
|
|||||||
if max_ancestry_depth == 1:
|
if max_ancestry_depth == 1:
|
||||||
ppid = pid_to_ppid(pid)
|
ppid = pid_to_ppid(pid)
|
||||||
pname = pid_to_name(ppid)
|
pname = pid_to_name(ppid)
|
||||||
return '\n PPID: {} ({})'.format(ppid, pname)
|
return '\n PPID: {} ({})'.format(ppid, pname)
|
||||||
if max_ancestry_depth == 0:
|
if max_ancestry_depth == 0:
|
||||||
return ''
|
return ''
|
||||||
anc_list = []
|
anc_list = []
|
||||||
@ -351,7 +351,7 @@ def pid_to_ancestry(pid, max_ancestry_depth=1):
|
|||||||
a = ''
|
a = ''
|
||||||
for i in anc_list:
|
for i in anc_list:
|
||||||
a = a + ' <= PID {} ({})'.format(i[0], i[1])
|
a = a + ' <= PID {} ({})'.format(i[0], i[1])
|
||||||
return '\n Ancestry: ' + a[4:]
|
return '\n Ancestry: ' + a[4:]
|
||||||
|
|
||||||
|
|
||||||
def pid_to_cmdline(pid):
|
def pid_to_cmdline(pid):
|
||||||
|
Loading…
Reference in New Issue
Block a user