Add clarifying comment to use of kill in isProcessRunning

This commit is contained in:
Ryan Huffman 2017-06-02 08:58:35 -07:00 committed by Chris Collins
parent 3888385a72
commit f10f717ea2

View file

@ -823,6 +823,9 @@ const notificationIcon = path.join(__dirname, '../resources/console-notification
function isProcessRunning(pid) {
try {
// Sending a signal of 0 is effectively a NOOP.
// If sending the signal is successful, kill will return true.
// If the process is not running, an exception will be thrown.
return process.kill(pid, 0);
} catch (e) {
}