Erlang: how to disable “crash dump” & “core dump”

2019-04-10 19:09发布

Is there any way to disable the generation of "crash dump" & "core dump" files when running 'erl' ?

PS: I know about the "+d" option of erl but I want to completely disable the generation of crash/core dumps.

标签: erlang
2条回答
等我变得足够好
2楼-- · 2019-04-10 19:46

If you are into dirty patching, you can insert a return statement right at the top of the erl_crash_dump_v function in break.c, and recompile.

查看更多
ら.Afraid
3楼-- · 2019-04-10 20:07

You may also set the ERL_CRASH_DUMP environment variable to "/dev/null". It designates to which file the crash dump should be written.

See: https://github.com/yrashk/erlang/blob/e1282325ed75e52a98d58f5bd9fb0fa27896173f/erts/emulator/beam/break.c#L684

查看更多
登录 后发表回答