From 2162157752808d05de68cd7fe6405eec9195f8a7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 21 Jun 2015 19:44:43 +0100 Subject: [PATCH] Display pid in fatal signal message --- src/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 2f36ce91..31f4f091 100644 --- a/src/main.cc +++ b/src/main.cc @@ -289,7 +289,8 @@ void signal_handler(int signal) } if (signal != SIGTERM) { - auto msg = format("Received {}, exiting.\nCallstack:\n{}", text, Backtrace{}.desc()); + auto msg = format("Received {}, exiting.\nPid: {}\nCallstack:\n{}", + text, getpid(), Backtrace{}.desc()); write_stderr(msg); notify_fatal_error(msg); }