From cb0caf91607825f64d70ff1ee80915a4b80b9a38 Mon Sep 17 00:00:00 2001 From: liuheng Date: Thu, 7 Nov 2024 14:18:57 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=9F=A5=E8=AF=A2ssh-agent=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=EF=BC=8C=E6=8E=A7=E5=88=B6=E5=8F=B0=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=EF=BC=8C=E5=AF=BC=E8=87=B4=E5=BB=BA=E7=AB=8B?= =?UTF-8?q?=E4=BA=92=E4=BF=A1=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gspylib/common/Common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/gspylib/common/Common.py b/script/gspylib/common/Common.py index 04076f8..5cefaec 100644 --- a/script/gspylib/common/Common.py +++ b/script/gspylib/common/Common.py @@ -2576,7 +2576,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 @@ -2584,7 +2584,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: