void () { if (processCanBeKilledByOS(getProcess())) { // execute 'kill -SIGKILL <pid>' on Unix killProcessTree(getProcess()); } else if (getProcess() instanceof ProcessTreeKiller) { ((ProcessTreeKiller)getProcess()).killProcessTree(); } }