]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: wdt: do not return an error when the watchdog couldn't be enabled
authorWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 09:46:13 +0000 (10:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Mar 2020 11:02:27 +0000 (12:02 +0100)
On operating systems not supporting to create a timer on
POSIX_THREAD_CPUTIME we emit a warning but we return an error so the
process fails to start, which is absurd. Let's return a success once
the warning is emitted instead.

This may be backported to 2.1 and 2.0.

src/wdt.c

index 8ccdb04054cc2443914174169ffd3007676c45d6..0c405b9db432996c903eeedcc7942b97a859be0d 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -156,7 +156,7 @@ int init_wdt_per_thread()
  fail1:
        ti->wd_timer = TIMER_INVALID;
        ha_warning("Failed to setup watchdog timer for thread %u, disabling lockup detection.\n", tid);
-       return 0;
+       return 1;
 }
 
 void deinit_wdt_per_thread()