mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-18 01:03:14 +00:00
1. Fixed windows null dereference crash
2. Updated Linux KVM support check, to check if X is apawned, which fixes cases where X libraries are present, but X isn't running.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -2986,7 +2986,7 @@ void ILibDuktape_ScriptContainer_StdErrSink_MicrostackThread(void *chain, void *
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
ILibProcessPipe_Pipe_Resume(ILibProcessPipe_Process_GetStdErr(master->child));
|
if (master->child != NULL) { ILibProcessPipe_Pipe_Resume(ILibProcessPipe_Process_GetStdErr(master->child)); }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void ILibDuktape_ScriptContainer_StdErrSink(ILibProcessPipe_Process sender, char *buffer, int bufferLen, int* bytesConsumed, void* user)
|
void ILibDuktape_ScriptContainer_StdErrSink(ILibProcessPipe_Process sender, char *buffer, int bufferLen, int* bytesConsumed, void* user)
|
||||||
|
|||||||
@@ -205,7 +205,20 @@ function monitorinfo()
|
|||||||
|
|
||||||
if(process.platform == 'linux' || process.platform == 'freebsd')
|
if(process.platform == 'linux' || process.platform == 'freebsd')
|
||||||
{
|
{
|
||||||
Object.defineProperty(this, 'kvm_x11_support', { value: (this.Location_X11LIB && this.Location_X11TST && this.Location_X11EXT)?true:false });
|
if (this.Location_X11LIB && this.Location_X11TST && this.Location_X11EXT)
|
||||||
|
{
|
||||||
|
var ch = require('child_process').execFile('/bin/sh', ['sh']);
|
||||||
|
ch.stderr.on('data', function () { });
|
||||||
|
ch.stdout.str = ''; ch.stdout.on('data', function (c) { this.str += c.toString(); });
|
||||||
|
ch.stdin.write('ps -e | grep X\nexit\n');
|
||||||
|
ch.waitExit();
|
||||||
|
Object.defineProperty(this, 'kvm_x11_support', { value: ch.stdout.str.trim() == '' ? false : true });
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Object.defineProperty(this, 'kvm_x11_support', { value: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.Location_X11LIB)
|
if (this.Location_X11LIB)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user