Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 300929 | Differences between
and this patch

Collapse All | Expand All

(-)dbus/dbus-sysdeps-unix.c.orig (-1 / +19 lines)
Lines 1372-1377 Link Here
1372
{
1372
{
1373
  int bytes_written;
1373
  int bytes_written;
1374
  char buf[1] = { '\0' };
1374
  char buf[1] = { '\0' };
1375
#ifdef __INTERIX
1376
  struct sigaction oldsigaction, newsigaction;
1377
  int sigactionfailed;
1378
#endif
1375
#if defined(HAVE_CMSGCRED) 
1379
#if defined(HAVE_CMSGCRED) 
1376
  union {
1380
  union {
1377
	  struct cmsghdr hdr;
1381
	  struct cmsghdr hdr;
Lines 1397-1408 Link Here
1397
  _DBUS_ASSERT_ERROR_IS_CLEAR (error);
1401
  _DBUS_ASSERT_ERROR_IS_CLEAR (error);
1398
  
1402
  
1399
 again:
1403
 again:
1400
1404
#ifdef __INTERIX
1405
  /* It would seem that Interix SIGPIPE happens faster than other UNICES */
1406
  newsigaction.sa_handler = SIG_IGN;
1407
  newsigaction.sa_mask = 0;
1408
  newsigaction.sa_flags = 0;
1409
  sigactionfailed = 0;
1410
  if (sigaction(SIGPIPE, &newsigaction, &oldsigaction) < 0) {
1411
  	_dbus_warn("sigaction failed before writing to pipe.\n");
1412
	sigactionfailed = 1;
1413
  }
1414
#endif
1401
#if defined(HAVE_CMSGCRED) 
1415
#if defined(HAVE_CMSGCRED) 
1402
  bytes_written = sendmsg (server_fd, &msg, 0);
1416
  bytes_written = sendmsg (server_fd, &msg, 0);
1403
#else
1417
#else
1404
  bytes_written = write (server_fd, buf, 1);
1418
  bytes_written = write (server_fd, buf, 1);
1405
#endif
1419
#endif
1420
#ifdef __INTERIX
1421
  if (!sigactionfailed)
1422
    sigaction(SIGPIPE, &oldsigaction, NULL);
1423
#endif
1406
1424
1407
  if (bytes_written < 0 && errno == EINTR)
1425
  if (bytes_written < 0 && errno == EINTR)
1408
    goto again;
1426
    goto again;

Return to bug 300929