[Pcsclite-cvs-commit] r4497 - /trunk/PCSC/src/winscard_msg.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Oct 18 09:44:50 UTC 2009


Author: rousseau
Date: Sun Oct 18 09:44:49 2009
New Revision: 4497

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4497
Log:
SHMMessageSend(): document the use of MSG_NOSIGNAL to ignore SIGPIPE
signal

Modified:
    trunk/PCSC/src/winscard_msg.c

Modified: trunk/PCSC/src/winscard_msg.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_msg.c?rev=4497&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_msg.c (original)
+++ trunk/PCSC/src/winscard_msg.c Sun Oct 18 09:44:49 2009
@@ -180,7 +180,16 @@
 				retval = -1;
 				break;
 			}
+			/* since we are a user library we can't play with signals
+			 * The signals may already be used by the application */
+#ifdef MSG_NOSIGNAL
+			/* Get EPIPE return code instead of SIGPIPE signal
+			 * Works on Linux */
 			written = send(filedes, buffer, remaining, MSG_NOSIGNAL);
+#else
+			/* we may get a SIGPIPE signal if the other side has closed */
+			written = write(filedes, buffer, remaining);
+#endif
 
 			if (written > 0)
 			{




More information about the Pcsclite-cvs-commit mailing list