1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-14 15:23:39 +00:00

1. Added addition native JS helpers

2. Updated metadata
This commit is contained in:
Bryan Roe
2020-05-22 14:08:58 -07:00
parent a7b30fb729
commit 3c6d23faa2
4 changed files with 38 additions and 2 deletions

View File

@@ -29,6 +29,8 @@ function dbus(address, uid, env)
.createEvent('signal');
Object.defineProperty(this, "uid", { value: uid });
this._child = require('child_process').execFile("/bin/sh", ["sh"], options);
this._child.descriptorMetadata = 'linux-dbus {uid: ' + uid + ', address: ' + address + '}';
if (uid != null)
{
this._child.stdin.write('dbus-monitor --session "type=\'signal\', interface=\'' + address + '\'" | ( while read X; do echo "$X"; done )\n');