1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Updated, so on non-windows platforms, when coreDumpLocation is set or reset, the process.rlimit is adjusted to enable/disable generating a core file.

This commit is contained in:
Bryan Roe
2019-08-27 15:12:49 -07:00
parent d7f0424d2c
commit 303bde7654

View File

@@ -972,6 +972,7 @@ duk_ret_t ILibDuktape_ScriptContainer_Process_coreDumpLocation_setter(duk_contex
duk_push_this(ctx); // [process]
duk_del_prop_string(ctx, -1, ILibDuktape_ScriptContainer_Process_CoreDumpPath); // [process]
duk_pop(ctx); // ...
duk_eval_string_noresult(ctx, "process.rlimit.set(process.RLIMITS.CORE, {soft: 0, hard: 0});");
}
else
{
@@ -980,6 +981,7 @@ duk_ret_t ILibDuktape_ScriptContainer_Process_coreDumpLocation_setter(duk_contex
g_ILibCrashDump_path = Duktape_GetBuffer(ctx, -1, NULL);
duk_put_prop_string(ctx, -2, ILibDuktape_ScriptContainer_Process_CoreDumpPath); // [process]
duk_pop(ctx); // ...
duk_eval_string_noresult(ctx, "process.rlimit.set(process.RLIMITS.CORE, {soft: -1, hard: -1});");
}
return(0);
}