From d6e552774d85f07ec1a1195e06842daab3c1ef4f Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Sun, 12 Jan 2020 16:52:10 +0100 Subject: PROX: print panic message on screen When PROX detects an error condition at startup, it calls PROX_PANIC which prints an message before calling rte_panic to end the application. If ncurses was already started, this results in the message being printed in ncurses (and prox.log) then leaving ncurses; hence the message is usually not visible to the user (until it open prox.log), giving the impression of an unexpected crash. With this fix, the error message is repeated after closing ncurses, hence the message will be printed on stdout. Note that it might also be printed twice on stdout if ncurses was not already started. As part of this fix, prox.log is now properly closed. Change-Id: If41875843f1a39bc715f4264b3992c3fa018394e Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/quit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'VNFs/DPPD-PROX/quit.h') diff --git a/VNFs/DPPD-PROX/quit.h b/VNFs/DPPD-PROX/quit.h index d0bf8b95..c3cd0569 100644 --- a/VNFs/DPPD-PROX/quit.h +++ b/VNFs/DPPD-PROX/quit.h @@ -34,6 +34,8 @@ if (cond) { \ plog_info(__VA_ARGS__); \ display_end(); \ + plog_end(); \ + plog_info(__VA_ARGS__); \ if (prox_cfg.flags & DSF_DAEMON) { \ pid_t ppid = getppid(); \ plog_info("sending SIGUSR2 to %d\n", ppid);\ -- cgit 1.2.3-korg