From e5c424dba16ad2613ee3a511420463eb622f7c31 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 27 Jul 2018 11:09:43 -0700 Subject: [PATCH] dll: service: FspServiceLoop Do not reset FspServiceConsoleModeEvent on reentry. It should be noted that reentry is not feasible, because StartServiceCtrlDispatcherW returns ERROR_SERVICE_ALREADY_RUNNING on reentry. --- src/dll/service.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dll/service.c b/src/dll/service.c index 37ddc740..9f3006f7 100644 --- a/src/dll/service.c +++ b/src/dll/service.c @@ -251,7 +251,7 @@ FSP_API NTSTATUS FspServiceLoop(FSP_SERVICE *Service) /* ENTER CONSOLE MODE! */ - /* create/reset the console mode event and console control handler */ + /* create the console mode event and console control handler */ if (0 == FspServiceConsoleModeEvent) { FspServiceConsoleModeEvent = CreateEventW(0, TRUE, FALSE, 0); @@ -267,12 +267,14 @@ FSP_API NTSTATUS FspServiceLoop(FSP_SERVICE *Service) goto console_mode_exit; } } +#if 0 else { ResetEvent(FspServiceConsoleModeEvent); FspServiceConsoleCtrlHandlerDisabled = 0; MemoryBarrier(); } +#endif /* prepare the command line arguments */ Argv = CommandLineToArgvW(GetCommandLineW(), &Argc);