From 2accf61bcd8c8f08ea5c3f590e3f03f4cf3307fc Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 24 Dec 2025 20:49:55 -0800 Subject: [PATCH] Adding undefined procedure. --- src/opt/util/util.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/opt/util/util.cpp b/src/opt/util/util.cpp index 9fc5ea1a0..b06e2ba7e 100755 --- a/src/opt/util/util.cpp +++ b/src/opt/util/util.cpp @@ -72,11 +72,22 @@ void kill_on_parent_death(int sig) #include #include +#include #include #include #include +template +static auto retry_eintr(Func &&fn) -> decltype(fn()) +{ + decltype(fn()) rc; + do { + rc = fn(); + } while (rc == -1 && errno == EINTR); + return rc; +} + void kill_on_parent_death(int sig) { const int ppid = getppid();