From 7d926758c91abc7008dd06a2a944e2a17b9b0e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 30 Nov 2012 16:51:40 +0100 Subject: erts: Change default of erl_crash.dump * Create an erl_crash.dump if no heart exists and no ERL_CRASH_DUMP_SECONDS is set (behaviour changed) * Don't create an erl_crash.dump if heart do exists and no ERL_CRASH_DUMP_SECONDS is set (behaviour not changed) This changes the behaviour back to the R15B02 default considering if a beam was running with no heart. The motivation is that we want a fast heart to fast restart erlang if it crashes but to be able to get non-truncated erl_crash.dumps via setting ERL_CRASH_DUMP_SECONDS if we so desire. --- erts/emulator/sys/win32/sys.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'erts/emulator/sys/win32/sys.c') diff --git a/erts/emulator/sys/win32/sys.c b/erts/emulator/sys/win32/sys.c index 50f6219374..578536ed08 100755 --- a/erts/emulator/sys/win32/sys.c +++ b/erts/emulator/sys/win32/sys.c @@ -255,8 +255,7 @@ void erl_sys_args(int* argc, char** argv) #endif } -void -erts_sys_prepare_crash_dump(int secs) +int erts_sys_prepare_crash_dump(int secs) { Port *heart_port; Eterm heap[3]; @@ -271,10 +270,14 @@ erts_sys_prepare_crash_dump(int secs) /* send to heart port, CMD = 8, i.e. prepare crash dump =o */ erts_write_to_port(NIL, heart_port, list); + + return 1; } /* Windows - free file descriptors are hopefully available */ /* Alarm not used on windows */ + + return 0; } static void -- cgit v1.2.3