mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-14 15:23:39 +00:00
fixed getEnvFromPid() for freebsd
This commit is contained in:
@@ -622,8 +622,9 @@ function UserSessions()
|
||||
{
|
||||
var child = require('child_process').execFile('/bin/sh', ['sh']);
|
||||
child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||
child.stdin.write("procstat -e " + pid + " | grep " + pid + " | awk '{ $1=\"\"; $2=\"\"; print $0 }' | tr \"\\ \" \"\\n\" | awk -F= '{ if($1==\"\") { print $0 }}'\nexit\n");
|
||||
child.stdin.write("procstat -e " + pid + " | grep " + pid + " | awk '{ $1=\"\"; $2=\"\"; print $0 }' | tr \"\\ \" \"\\n\"\nexit\n");
|
||||
child.waitExit();
|
||||
|
||||
var env;
|
||||
var tokens = child.stdout.str.trim().split('\n');
|
||||
for(var i in tokens)
|
||||
|
||||
Reference in New Issue
Block a user