From de2f8bd944701d340238bfd300b50fc987fd5587 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 2 Jun 2017 08:58:35 -0700 Subject: [PATCH] Add clarifying comment to use of kill in isProcessRunning --- server-console/src/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server-console/src/main.js b/server-console/src/main.js index 46cc472e04..408a17bd56 100644 --- a/server-console/src/main.js +++ b/server-console/src/main.js @@ -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) { }