public static void assertAndDestroyProcessGroup ( String pgrpId , long interval , boolean inBackground ) throws IOException { // Make sure that the pid given is a process group leader if ( ! checkPidPgrpidForMatch ( pgrpId , PROCFS ) ) { throw new IOException ( "Process with PID " + pgrpId + " is not a process group leader." ) ; } destroyProcessGroup ( pgrpId , interval , inBackground ) ; }
Make sure that the given pid is a process group leader and then destroy the process group .