public static void killLinuxProcess()

in shardingsphere-benchmark/src/main/java/org/apache/shardingsphere/benchmark/common/file/util/ProcessUtil.java [88:111]


    public static void killLinuxProcess(String Pid) {
        
        Process process = null;
        BufferedReader reader = null;
        try {
            process = Runtime.getRuntime().exec("kill -9 " + Pid);
            reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
            String line = null;
            while ((line = reader.readLine()) != null) {
                System.out.println("kill PID return info -----> " + line);
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (process != null) {
                process.destroy();
            }
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e) { }
            }
        }
    }