mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-22 02:08:27 +01:00
Shorten the Linux terminator
No need to overcomplicate things. Also, no risk of killing the entire program with this.
This commit is contained in:
parent
ff82fd5151
commit
18953046b8
@ -98,7 +98,7 @@ public class Executable {
|
||||
if (Platform.getSystem() == Platform.WINDOWS) {
|
||||
Runtime.getRuntime().exec(new String[]{"taskkill.exe", "/T", "/F", "/PID", pid.toString()}).waitFor();
|
||||
} else if (USE_SESSION_TRACKING) {
|
||||
Runtime.getRuntime().exec(new String[]{"bash", "-c", "kill -9 $(ps -o pid= --sid $(ps -o sid= --pid " + pid + "))"}).waitFor();
|
||||
Runtime.getRuntime().exec(new String[]{"bash", "-c", "kill -9 $(ps -s " + pid + " -o pid=)"}).waitFor();
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {}
|
||||
|
||||
|
@ -98,7 +98,7 @@ public class Executable {
|
||||
if (Platform.getSystem() == Platform.WINDOWS) {
|
||||
Runtime.getRuntime().exec(new String[]{"taskkill.exe", "/T", "/F", "/PID", pid.toString()}).waitFor();
|
||||
} else if (USE_SESSION_TRACKING) {
|
||||
Runtime.getRuntime().exec(new String[]{"bash", "-c", "kill -9 $(ps -o pid= --sid $(ps -o sid= --pid " + pid + "))"}).waitFor();
|
||||
Runtime.getRuntime().exec(new String[]{"bash", "-c", "kill -9 $(ps -s " + pid + " -o pid=)"}).waitFor();
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user