SPDX: Mass-update to GPL-2.0-or-later
[exim.git] / src / src / log.c
index 8ca973f2def7a8b7b8a32796d4e9edb43a04aaea..6c483216ad61d79989e48351adc5342e69b68811 100644 (file)
@@ -5,6 +5,7 @@
 /* Copyright (c) The Exim Maintainers 2020 - 2022 */
 /* Copyright (c) University of Cambridge 1995 - 2018 */
 /* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 /* Functions for writing log files. The code for maintaining datestamped
 log files was originally contributed by Tony Sheen. */
@@ -1278,7 +1279,10 @@ if (flags & LOG_PANIC)
   /* Give up if the DIE flag is set */
 
   if ((flags & LOG_PANIC_DIE) != LOG_PANIC)
-    die(NULL, US"Unexpected failure, please try later");
+    if (panic_coredump)
+      kill(getpid(), SIGSEGV); /* deliberate trap */
+    else
+      die(NULL, US"Unexpected failure, please try later");
   }
 }