1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-20 10:13:17 +00:00

Updated service restart on Windows, when called from self.

This commit is contained in:
Bryan Roe
2021-02-07 15:26:53 -08:00
parent 66e489c49c
commit 43c5f2d1b5
4 changed files with 34 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ function windows_notifybar_system(title, tsid)
{
var ret = {};
var script = Buffer.from("require('notifybar-desktop')('" + title + "').on('close', function(){process._exit();});").toString('base64');
var script = Buffer.from("require('notifybar-desktop')('" + title + "').on('close', function(){process._exit();});require('DescriptorEvents').addDescriptor(require('util-descriptors').getProcessHandle(" + process.pid + ")).on('signaled', function(){process._exit();});").toString('base64');
require('events').EventEmitter.call(ret, true)
.createEvent('close')