From: Lubomir Rintel Date: Fri, 23 Oct 2015 16:02:42 +0000 (+0200) Subject: wpa_supplicant: Reopen debug log file upon receipt of SIGHUP signal X-Git-Tag: hostap_2_6~1449 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1248e58492300ac23e0072a4ca9e14ab8abee13c;p=thirdparty%2Fhostap.git wpa_supplicant: Reopen debug log file upon receipt of SIGHUP signal This is useful for logrotate to be able to rotate the file even if the control interface is not enabled (e.g., when using DBus). Signed-off-by: Lubomir Rintel --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index f5d73862f..7631a7940 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -963,6 +963,11 @@ static void wpa_supplicant_reconfig(int sig, void *signal_ctx) wpa_supplicant_terminate_proc(global); } } + + if (wpa_debug_reopen_file() < 0) { + /* Ignore errors since we cannot really do much to fix this */ + wpa_printf(MSG_DEBUG, "Could not reopen debug log file"); + } }