[Ada] Improve EINTR error handling on "poll" system call
authorDmitriy Anisimkov <anisimko@adacore.com>
Mon, 21 Sep 2020 06:00:41 +0000 (12:00 +0600)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 27 Oct 2020 09:19:28 +0000 (05:19 -0400)
gcc/ada/

* libgnat/g-socpol.adb (Wait): Do not exit from loop on EINTR
error and timeout is over.

gcc/ada/libgnat/g-socpol.adb

index ab3286c..cd82bb8 100644 (file)
@@ -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