void () { // Override this method if you want to customize default destroy behaviour, e.g. if you want to use some soft-kill. final Process process = getProcess(); if (shouldDestroyProcessRecursively() && processCanBeKilledByOS(process)) { killProcessTree(process); } else { process.destroy(); } }