Hi,

www/sope now uses MSG_NOSIGNAL as flag for send(2), see the Linux manual page:
http://www.kernel.org/doc/man-pages/online/pages/man2/send.2.html

After some googling, I found that I can define it to 0, and just go ahead. This 
way its right now in SOPE.
I opened a bug report to get the patch upstream::
http://www.sogo.nu/bugs/view.php?id=1460

The answer I got tells, me, that its needed to fix a crash in openchange/samba4 
compatibility.
This is for sope/sogo 2.0, we don't have openchange/samba4 for now, so ignoring 
it, should be no problem for now.

Anyone can give me a hint on how to better handle this MSG_NOSIGNAL instead of 
just defining it to 0?

checking the ports tree for examples, I see it differently handled:
most of them, just define it to 0, others i.e. 

dctc/patches/patch-src_dc_xfer_common_c

does:
+/* compability macros for reading/writing to sockets */
+#ifdef __OpenBSD__
+# define sock_read(sck, buf, size, flags) read(sck, buf, size)
+# define sock_write(sck, buf, size, flags) write(sck, buf, size)
+#else
+# define sock_read(sck, buf, size, flags) recv(sck, buf, size, flags)
+# define sock_write(sck, buf, size, flags) send(sck, buf, size, flags)
+#endif
+

and then later:

-               res=send(sck,buf,sizeof(buf),MSG_NOSIGNAL /* |MSG_WAITALL */ );
+               res=sock_write(sck,buf,sizeof(buf),MSG_NOSIGNAL /* |MSG_WAITALL 
*/ );



I'm unsure whether the dctc approach is good?
Mac OSX seems to have SO_NOSIGPIPE as setsockopt() option, but we also don't 
seem to have this.

any insights or pointers to further research on my side is apprechiated.

cheers,
Sebastian

Reply via email to