[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream/services
From:       Hasso Tepper <hasso () kde ! org>
Date:       2007-04-21 9:23:04
Message-ID: 1177147384.608543.14512.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 656382 by hasso:

Make it work for systems not having MSG_NOSIGNAL (like DragonFlyBSD
for example).


 M  +8 -0      comm.cpp  


--- trunk/icecream/services/comm.cpp #656381:656382
@@ -240,7 +240,15 @@
   bool error = false;
   while (msgtogo)
     {
+#ifdef MSG_NOSIGNAL
       ssize_t ret = send (fd, buf, msgtogo, MSG_NOSIGNAL);
+#else
+      void (*oldsigpipe)(int);
+
+      oldsigpipe = signal (SIGPIPE, SIG_IGN);
+      ssize_t ret = send (fd, buf, msgtogo, 0);
+      signal (SIGPIPE, oldsigpipe);
+#endif
       if (ret < 0)
         {
 	  if (errno == EINTR)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic