1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-02 08:33:20 +00:00

1. Updated libfinder for Linux for cases when ldconfig is not on PATH

2. Updated websockets, so it will autofragment into 30k chunks, as a temp workaround for platforms like CentOS 5.11 until I find the underlying issue
This commit is contained in:
Bryan Roe
2019-08-21 11:46:38 -07:00
parent dda535a817
commit 1360835f1b
3 changed files with 31 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ var _NET_WM_STATE_TOGGLE = 2; // toggle property
var SubstructureRedirectMask = (1 << 20);
var SubstructureNotifyMask = (1 << 19);
function getLibInfo(libname)
{
if (process.platform != 'linux') { throw ('Only supported on linux'); }
@@ -30,7 +31,15 @@ function getLibInfo(libname)
var child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.stdin.write("ldconfig -p | grep '" + libname + ".so.'\nexit\n");
child.stdin.write("whereis ldconfig | awk '{ print $2 }'\nexit\n");
child.waitExit();
var ldconfig = child.stdout.str.trim();
child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = '';
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.stdin.write(ldconfig + " -p | grep '" + libname + ".so.'\nexit\n");
child.waitExit();
var v = [];