mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:39:26 +02:00
Add clarifying comment to use of kill in isProcessRunning
This commit is contained in:
parent
3888385a72
commit
f10f717ea2
1 changed files with 3 additions and 0 deletions
|
@ -823,6 +823,9 @@ const notificationIcon = path.join(__dirname, '../resources/console-notification
|
||||||
|
|
||||||
function isProcessRunning(pid) {
|
function isProcessRunning(pid) {
|
||||||
try {
|
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);
|
return process.kill(pid, 0);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue