#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).
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));
+ }
}
/**