!961 fix 查询ssh-agent进程,控制台输出不全,导致建立互信失败
Merge pull request !961 from liuheng/fix45
This commit is contained in:
commit
2d4a4e1090
@ -2577,7 +2577,7 @@ class DefaultValue():
|
||||
return local_ips
|
||||
|
||||
@staticmethod
|
||||
def get_pid(desc):
|
||||
def get_pid(desc, width=300):
|
||||
"""
|
||||
function : get the ID of the process
|
||||
that contains the specified content
|
||||
@ -2585,7 +2585,7 @@ class DefaultValue():
|
||||
output : list
|
||||
"""
|
||||
pids = []
|
||||
cmd = "ps ux | grep '%s' | grep -v grep" % desc
|
||||
cmd = "ps ux --width=%s | grep '%s' | grep -v grep" % (width, desc)
|
||||
proc = FastPopen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
if stderr:
|
||||
|
Loading…
x
Reference in New Issue
Block a user