mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 23:12:16 +02:00
Add clarifying comment to use of kill in isProcessRunning
This commit is contained in:
parent
86da91ac8d
commit
de2f8bd944
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue