1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-12 22:33:55 +00:00

Fixed edge case that could cause 100% cpu utilization

This commit is contained in:
Bryan Roe
2019-01-11 13:52:55 -08:00
parent 0f89f3b812
commit 236cc0dc2c

View File

@@ -25,7 +25,7 @@ function dbus(address, uid)
.createEvent('signal');
Object.defineProperty(this, "uid", { value: uid });
this._child = require('child_process').execFile("/bin/sh", ["sh"], { type: require('child_process').SpawnTypes.TERM, uid: uid == null ? -1 : uid });
this._child.stdin.write('dbus-monitor --session "type=\'signal\', interface=\'' + address + '\'" | ( while true; do read X; echo "$X"; done )\n');
this._child.stdin.write('dbus-monitor --session "type=\'signal\', interface=\'' + address + '\'" | ( while read X; do echo "$X"; done )\n');
this._child.stdout.dbus = this;
this._child.stdout.on('data', function (chunk)
{