mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-21 19:17:31 +08:00
Linux下检测正在运行的office进程检测逻辑修正
This commit is contained in:
@@ -120,7 +120,7 @@ public class OfficePluginManager {
|
|||||||
baos.write(b);
|
baos.write(b);
|
||||||
}
|
}
|
||||||
String s = baos.toString();
|
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"};
|
String[] cmd = {"sh", "-c", "ps -ef | grep soffice.bin | grep -v grep | awk '{print \"kill -9 \"$2}' | sh"};
|
||||||
Runtime.getRuntime().exec(cmd);
|
Runtime.getRuntime().exec(cmd);
|
||||||
flag = true;
|
flag = true;
|
||||||
|
Reference in New Issue
Block a user