From bba44ca05738081821e95d5f873293547fa13953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=B2=BE=E5=8D=8E?= <842761733@qq.com> Date: Fri, 11 Nov 2022 17:06:42 +0800 Subject: [PATCH] =?UTF-8?q?Linux=E4=B8=8B=E6=A3=80=E6=B5=8B=E6=AD=A3?= =?UTF-8?q?=E5=9C=A8=E8=BF=90=E8=A1=8C=E7=9A=84office=E8=BF=9B=E7=A8=8B?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=E9=80=BB=E8=BE=91=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/main/java/cn/keking/service/OfficePluginManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/cn/keking/service/OfficePluginManager.java b/server/src/main/java/cn/keking/service/OfficePluginManager.java index f6cafef2..3a7d8163 100644 --- a/server/src/main/java/cn/keking/service/OfficePluginManager.java +++ b/server/src/main/java/cn/keking/service/OfficePluginManager.java @@ -120,7 +120,7 @@ public class OfficePluginManager { baos.write(b); } String s = baos.toString(); - if (!"0".equals(s)) { + if (!s.startsWith("0")) { String[] cmd = {"sh", "-c", "ps -ef | grep soffice.bin | grep -v grep | awk '{print \"kill -9 \"$2}' | sh"}; Runtime.getRuntime().exec(cmd); flag = true;