diff --git a/test/failure_handler/src/share/conf/linux.properties b/test/failure_handler/src/share/conf/linux.properties
index bd737039c1e..fe4b1d9d979 100644
--- a/test/failure_handler/src/share/conf/linux.properties
+++ b/test/failure_handler/src/share/conf/linux.properties
@@ -54,8 +54,11 @@ native.stack.args.delimiter=\0
 native.stack.params.repeat=6
 
 # has to be the last command
-native.core.app=kill
-native.core.args=-ABRT %p
+native.core.app=bash
+# The below trick was found on https://stackoverflow.com/a/41613532
+native.core.args=-c\0kill -ABRT %p && tail --pid=%p -f /dev/null
+native.core.args.delimiter=\0
+native.core.timeout=600000
 
 cores=native.gdb
 native.gdb.app=gdb
diff --git a/test/failure_handler/src/share/conf/mac.properties b/test/failure_handler/src/share/conf/mac.properties
index 6cb0c911239..f075178e7eb 100644
--- a/test/failure_handler/src/share/conf/mac.properties
+++ b/test/failure_handler/src/share/conf/mac.properties
@@ -62,8 +62,11 @@ native.stack.params.repeat=6
 native.stack.args=-c\0DevToolsSecurity --status | grep -q enabled && lldb -o 'attach %p' -o 'thread backtrace all' -o 'detach' -o 'quit'
 
 # has to be the last command
-native.core.app=kill
-native.core.args=-ABRT %p
+native.core.app=bash
+# The below trick was found on https://stackoverflow.com/a/41613532
+native.core.args=-c\0kill -ABRT %p && lsof -p %p +r 1 &>/dev/null
+native.core.delimiter=\0
+native.core.timeout=600000
 
 cores=native.lldb
 native.lldb.app=lldb