From 9852b4de81edde8ff01c5e143a5103f2ec862e4b Mon Sep 17 00:00:00 2001 From: Alexander Shaduri Date: Fri, 4 Feb 2022 11:46:35 +0400 Subject: [PATCH] Fixed compilation under Windows. Signed-off-by: Alexander Shaduri --- src/applib/cmdex.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applib/cmdex.cpp b/src/applib/cmdex.cpp index 4774569..25d5798 100644 --- a/src/applib/cmdex.cpp +++ b/src/applib/cmdex.cpp @@ -253,8 +253,13 @@ bool Cmdex::execute() bool Cmdex::try_stop(hz::signal_t sig) { DBG_FUNCTION_ENTER_MSG; +#ifdef _WIN32 + if (!this->running_ || this->pid_ == 0) + return false; +#else if (!this->running_ || this->pid_ <= 0) return false; +#endif // other variants: SIGHUP(1) (terminal closed), SIGINT(2) (Ctrl-C), // SIGKILL(9) (kill).