[Pcsclite-cvs-commit] r2148 - trunk/PCSC/src

Ludovic Rousseau rousseau at costa.debian.org
Tue Sep 5 16:39:58 UTC 2006


Author: rousseau
Date: 2006-09-05 16:39:58 +0000 (Tue, 05 Sep 2006)
New Revision: 2148

Modified:
   trunk/PCSC/src/winscard_msg_srv.c
Log:
SHMProcessEventsServer(): do not use a 1 second timeout in select() to
catch Ctrl-C since SIGINT will cause select() to return with EINTR

See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=205182 for the
bug report


Modified: trunk/PCSC/src/winscard_msg_srv.c
===================================================================
--- trunk/PCSC/src/winscard_msg_srv.c	2006-09-05 12:01:43 UTC (rev 2147)
+++ trunk/PCSC/src/winscard_msg_srv.c	2006-09-05 16:39:58 UTC (rev 2148)
@@ -169,11 +169,7 @@
 {
 	fd_set read_fd;
 	int selret;
-	struct timeval tv;
 	
-	tv.tv_sec = 1;
-	tv.tv_usec = 0;
-
 	FD_ZERO(&read_fd);
 
 	/*
@@ -182,7 +178,7 @@
 	FD_SET(commonSocket, &read_fd);
 
 	selret = select(commonSocket + 1, &read_fd, (fd_set *) NULL,
-		(fd_set *) NULL, &tv);
+		(fd_set *) NULL, NULL);
 
 	if (selret < 0)
 	{
@@ -192,9 +188,6 @@
 		return -1;
 	}
 
-	if (selret == 0)
-		/* timeout */
-		return 2;
 	/*
 	 * A common pipe packet has arrived - it could be a new application  
 	 */




More information about the Pcsclite-cvs-commit mailing list