private void sendSignalToProcess(Process process, Signal signal) { int processPid = getProcessPid(process); if (processPid != -1) { LOGGER.info("Sending signal {} to process {}", signal.intValue(), processPid); POSIXFactory.getNativePOSIX().kill(processPid, signal.intValue()); } }
/** * Get a POSIX instance. If a true native implementation can't be loaded, allow that * error to propagate rather than falling back on the pure-Java version. * * @return a native POSIX implementation, raising errors if the native version can't load */ public static POSIX getNativePOSIX() { return getNativePOSIX(new DefaultPOSIXHandler()); }
/** * Get a POSIX instance. If a true native implementation can't be loaded, allow that * error to propagate rather than falling back on the pure-Java version. * * @return a native POSIX implementation, raising errors if the native version can't load */ public static POSIX getNativePOSIX() { return getNativePOSIX(new DefaultPOSIXHandler()); }
/** * Get a POSIX instance. If a true native implementation can't be loaded, allow that * error to propagate rather than falling back on the pure-Java version. * * @return a native POSIX implementation, raising errors if the native version can't load */ public static POSIX getNativePOSIX() { return getNativePOSIX(new DefaultPOSIXHandler()); }