/** * Send the signal with the specified name to this process. * * @param signalName the name of the signal to send * * @throws IllegalArgumentException if the signal name is not valid * @throws SigarException if the native kill() call fails * * @since 4.4 */ public void kill(String signalName) throws SigarException { int signalNumber = getSignalNumber(signalName); // TODO: Should we check if the process is even running and throw a special exception if it's not? Sigar fullSigar = new Sigar(); try { fullSigar.kill(pid, signalNumber); } finally { fullSigar.close(); } }
/** * Send the signal with the specified name to this process. * * @param signalName the name of the signal to send * * @throws IllegalArgumentException if the signal name is not valid * @throws SigarException if the native kill() call fails * * @since 4.4 */ public void kill(String signalName) throws SigarException { int signalNumber = getSignalNumber(signalName); // TODO: Should we check if the process is even running and throw a special exception if it's not? Sigar fullSigar = new Sigar(); try { fullSigar.kill(pid, signalNumber); } finally { fullSigar.close(); } }