From: Dmitriy Anisimkov Date: Mon, 21 Sep 2020 06:00:41 +0000 (+0600) Subject: [Ada] Improve EINTR error handling on "poll" system call X-Git-Tag: basepoints/gcc-12~3843 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=79e61a6361f87a8162fe362e08d3ffeb76803606;p=gcc.git [Ada] Improve EINTR error handling on "poll" system call gcc/ada/ * libgnat/g-socpol.adb (Wait): Do not exit from loop on EINTR error and timeout is over. --- diff --git a/gcc/ada/libgnat/g-socpol.adb b/gcc/ada/libgnat/g-socpol.adb index ab3286c87fd2..cd82bb83b5df 100644 --- a/gcc/ada/libgnat/g-socpol.adb +++ b/gcc/ada/libgnat/g-socpol.adb @@ -368,8 +368,7 @@ package body GNAT.Sockets.Poll is Poll_Timeout := Timeout - (Clock - Stamp); if Poll_Timeout < 0.0 then - Count := 0; - return; + Poll_Timeout := 0.0; elsif Poll_Timeout > Timeout then -- Clock moved back in time. This should not be happen when