~ubuntu-branches/debian/sid/glib2.0/sid

« back to all changes in this revision

Viewing changes to glib/gwakeup.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-05-08 06:25:57 UTC
  • mfrom: (1.27.14) (3.1.181 experimental)
  • Revision ID: package-import@ubuntu.com-20130508062557-i7gbku66mls70gi2
Tags: 2.36.1-2
Merge experimental branch, upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include "config.h"
23
23
 
24
24
 
25
 
/* gwakeup.h is special -- GIO and some test cases include it.  As such,
 
25
/* gwakeup.c is special -- GIO and some test cases include it.  As such,
26
26
 * it cannot include other glib headers without triggering the single
27
27
 * includes warnings.  We have to manually include its dependencies here
28
28
 * (and at all other use sites).
230
230
g_wakeup_signal (GWakeup *wakeup)
231
231
{
232
232
  guint64 one = 1;
 
233
  int res;
233
234
 
234
235
  if (wakeup->fds[1] == -1)
235
 
    write (wakeup->fds[0], &one, sizeof one);
 
236
    {
 
237
      do
 
238
        res = write (wakeup->fds[0], &one, sizeof one);
 
239
      while (G_UNLIKELY (res == -1 && errno == EINTR));
 
240
    }
236
241
  else
237
 
    write (wakeup->fds[1], &one, 1);
 
242
    {
 
243
      do
 
244
        res = write (wakeup->fds[1], &one, 1);
 
245
      while (G_UNLIKELY (res == -1 && errno == EINTR));
 
246
    }
238
247
}
239
248
 
240
249
/**