aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-07-07 20:04:19 +0200
committerSverker Eriksson <[email protected]>2016-07-07 20:04:19 +0200
commitd300c1c205b73721074e6eda1576e77c5069e90f (patch)
tree3b3b8bfd742e4de8d903ba4a77a8d4b4b58ef807 /erts
parent4cf0d172b61b06f8b5c2765da7e134c2b912c492 (diff)
parentfcddab275754de3a07623c7b9bdbe8966ef1a24c (diff)
downloadotp-d300c1c205b73721074e6eda1576e77c5069e90f.tar.gz
otp-d300c1c205b73721074e6eda1576e77c5069e90f.tar.bz2
otp-d300c1c205b73721074e6eda1576e77c5069e90f.zip
Merge branch 'maint'
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/sys/unix/erl_child_setup.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/erts/emulator/sys/unix/erl_child_setup.c b/erts/emulator/sys/unix/erl_child_setup.c
index 6beb316350..de61726e5b 100644
--- a/erts/emulator/sys/unix/erl_child_setup.c
+++ b/erts/emulator/sys/unix/erl_child_setup.c
@@ -54,6 +54,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
#include <sys/wait.h>
#define WANT_NONBLOCKING
@@ -79,10 +80,17 @@
#define DEBUG_PRINT(fmt, ...)
#endif
-#define ABORT(fmt, ...) do { \
- fprintf(stderr, "erl_child_setup: " fmt "\r\n", ##__VA_ARGS__); \
- abort(); \
- } while(0)
+static char abort_reason[200]; /* for core dump inspection */
+
+static void ABORT(const char* fmt, ...)
+{
+ va_list arglist;
+ va_start(arglist, fmt);
+ vsprintf(abort_reason, fmt, arglist);
+ fprintf(stderr, "erl_child_setup: %s\r\n", abort_reason);
+ va_end(arglist);
+ abort();
+}
#ifdef DEBUG
void