mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-26 05:03:15 +00:00
added daemon helper
This commit is contained in:
@@ -139,6 +139,11 @@ char* crashMemory = ILib_POSIX_InstallCrashHandler(argv[0]);
|
|||||||
integratedJavaScript = ILibString_Copy(script, (int)sizeof(script) - 1);
|
integratedJavaScript = ILibString_Copy(script, (int)sizeof(script) - 1);
|
||||||
integratedJavaScriptLen = (int)sizeof(script) - 1;
|
integratedJavaScriptLen = (int)sizeof(script) - 1;
|
||||||
}
|
}
|
||||||
|
if (argc > 1 && strcmp(argv[1], "-daemon") == 0 && integratedJavaScriptLen == 0)
|
||||||
|
{
|
||||||
|
integratedJavaScript = ILibString_Copy("require('daemon').agent();", -1);
|
||||||
|
integratedJavaScriptLen = (int)strnlen_s(integratedJavaScript, sizeof(ILibScratchPad));
|
||||||
|
}
|
||||||
if (argc > 1 && strcasecmp(argv[1], "-licenses") == 0)
|
if (argc > 1 && strcasecmp(argv[1], "-licenses") == 0)
|
||||||
{
|
{
|
||||||
printf("========================================================================================\n");
|
printf("========================================================================================\n");
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -539,7 +539,7 @@ duk_ret_t ILibDuktape_ScriptContainer_Process_Argv(duk_context *ctx)
|
|||||||
if (duk_has_prop_string(ctx, -1, ILibDuktape_ScriptContainer_Process_ArgArray))
|
if (duk_has_prop_string(ctx, -1, ILibDuktape_ScriptContainer_Process_ArgArray))
|
||||||
{
|
{
|
||||||
duk_get_prop_string(ctx, -1, ILibDuktape_ScriptContainer_Process_ArgArray); // [process][array]
|
duk_get_prop_string(ctx, -1, ILibDuktape_ScriptContainer_Process_ArgArray); // [process][array]
|
||||||
if (readOnly != 0) { duk_dup(ctx, -1); } // [process][array][array]
|
if (readOnly != 0) { duk_array_clone(ctx, -1); } // [process][array][array]
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user