Remove alleged support for last-millennium Unixes
[platform/upstream/glib.git] / glib / gwakeup.c
index 2f191cb..2aec2f5 100644 (file)
@@ -22,7 +22,7 @@
 #include "config.h"
 
 
-/* gwakeup.h is special -- GIO and some test cases include it.  As such,
+/* gwakeup.c is special -- GIO and some test cases include it.  As such,
  * it cannot include other glib headers without triggering the single
  * includes warnings.  We have to manually include its dependencies here
  * (and at all other use sites).
@@ -36,7 +36,7 @@
 
 #include "gwakeup.h"
 
-/**
+/*< private >
  * SECTION:gwakeup
  * @title: GWakeup
  * @short_description: portable cross-thread event signal mechanism
@@ -230,11 +230,20 @@ void
 g_wakeup_signal (GWakeup *wakeup)
 {
   guint64 one = 1;
+  int res;
 
   if (wakeup->fds[1] == -1)
-    write (wakeup->fds[0], &one, sizeof one);
+    {
+      do
+        res = write (wakeup->fds[0], &one, sizeof one);
+      while (G_UNLIKELY (res == -1 && errno == EINTR));
+    }
   else
-    write (wakeup->fds[1], &one, 1);
+    {
+      do
+        res = write (wakeup->fds[1], &one, 1);
+      while (G_UNLIKELY (res == -1 && errno == EINTR));
+    }
 }
 
 /**