From 6af8fea4bbad6678ad6ef82b00860877a01c3614 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Wed, 23 Oct 2024 12:24:06 +0200 Subject: [PATCH] Cygwin: timer_delete: Fix return value timer_delete() always returned failure. This issue has been detected by 'stress-ng --hrtimers 1'. Fixes: 229ea3f23c015 ("Cygwin: posix timers: reimplement using OS timer") Signed-off-by: Christian Franke --- winsup/cygwin/posix_timer.cc | 1 + winsup/cygwin/release/3.5.5 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc index 9d832f201..a336b2bc2 100644 --- a/winsup/cygwin/posix_timer.cc +++ b/winsup/cygwin/posix_timer.cc @@ -530,6 +530,7 @@ timer_delete (timer_t timerid) __leave; } delete in_tt; + ret = 0; } __except (EFAULT) {} __endtry diff --git a/winsup/cygwin/release/3.5.5 b/winsup/cygwin/release/3.5.5 index d01f31c60..bcc2c661b 100644 --- a/winsup/cygwin/release/3.5.5 +++ b/winsup/cygwin/release/3.5.5 @@ -10,3 +10,5 @@ Fixes: - Fix pread() and pwrite() EBADF error after fork(). Addresses: https://sourceware.org/pipermail/cygwin/2024-September/256468.html + +- Fix timer_delete() return value which always indicated failure. -- 2.43.5