1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-16 00:03:45 +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:
Bryan Roe
2019-09-19 15:15:29 -07:00
parent 813c0395b0
commit b2f3e28c33
3 changed files with 20 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2986,7 +2986,7 @@ void ILibDuktape_ScriptContainer_StdErrSink_MicrostackThread(void *chain, void *
}
#ifdef WIN32
ILibProcessPipe_Pipe_Resume(ILibProcessPipe_Process_GetStdErr(master->child));
if (master->child != NULL) { ILibProcessPipe_Pipe_Resume(ILibProcessPipe_Process_GetStdErr(master->child)); }
#endif
}
void ILibDuktape_ScriptContainer_StdErrSink(ILibProcessPipe_Process sender, char *buffer, int bufferLen, int* bytesConsumed, void* user)

View File

@@ -205,7 +205,20 @@ function monitorinfo()
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)
{