Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Erlang: how to disable "crash dump" & "core dump" generation?

Tags:

erlang

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.

like image 881
jldupont Avatar asked Jan 24 '23 05:01

jldupont


2 Answers

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

like image 84
Daniel Abrahamsson Avatar answered Feb 05 '23 00:02

Daniel Abrahamsson


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.

like image 30
Zed Avatar answered Feb 05 '23 01:02

Zed