From 47b7af20f6b12133b00ab54b7946b63fc1f1d7eb Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Wed, 13 Sep 2023 07:44:45 -0700 Subject: [PATCH] in_calyptia_fleet: use GenerateConsoleCtrlEvent on win32 to execute reload. Signed-off-by: Phillip Whelan --- plugins/in_calyptia_fleet/in_calyptia_fleet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index caca271e857..7f809775bd5 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -302,8 +302,11 @@ static void *do_reload(void *data) reload->flb->config->conf_path_file = reload->cfg_path; sleep(5); +#ifndef FLB_SYSTEM_WINDOWS kill(getpid(), SIGHUP); - +#else + GenerateConsoleCtrlEvent(1 /* CTRL_BREAK_EVENT_1 */, 0); +#endif return NULL; }