Linux下检测正在运行的office进程检测逻辑修正
parent
5134f7a121
commit
bba44ca057
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue