mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-06 10:34:09 +00:00
updated findEnv() for freebsd
This commit is contained in:
@@ -641,7 +641,7 @@ function UserSessions()
|
|||||||
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
child.stdout.str = '';
|
child.stdout.str = '';
|
||||||
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
|
child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
|
||||||
child.stdin.write("ps -e -o pid -o user | grep " + uname + " | awk '{ print $1 }'\nexit\n");
|
child.stdin.write("ps " + (process.platform == 'freebsd' ? "-ax ":"") + "-e -o pid -o user | grep " + uname + " | awk '{ print $1 }'\nexit\n");
|
||||||
child.waitExit();
|
child.waitExit();
|
||||||
|
|
||||||
var lines = child.stdout.str.split('\n');
|
var lines = child.stdout.str.split('\n');
|
||||||
|
|||||||
Reference in New Issue
Block a user