[120902] trunk/base/src/pextlib1.0/curl.c

cal at macports.org cal at macports.org
Wed Jun 11 03:56:08 PDT 2014


Revision: 120902
          https://trac.macports.org/changeset/120902
Author:   cal at macports.org
Date:     2014-06-11 03:56:08 -0700 (Wed, 11 Jun 2014)
Log Message:
-----------
base: pextlib1.0/curl.c: Always check for Tcl signals before returning to avoid breaking special handling of SIGINT/SIGTERM.

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/curl.c

Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c	2014-06-11 10:47:01 UTC (rev 120901)
+++ trunk/base/src/pextlib1.0/curl.c	2014-06-11 10:56:08 UTC (rev 120902)
@@ -538,6 +538,15 @@
 			 * select(2) makes the case of nfds == -1 a sleep. */
 			rc = select(nfds + 1, &readfds, &writefds, &errorfds, &timeout);
 			if (-1 == rc) {
+				/* check for signals first to avoid breaking our special
+				 * handling of SIGINT and SIGTERM */
+				if (Tcl_AsyncReady()) {
+					theResult = Tcl_AsyncInvoke(interp, theResult);
+					if (theResult != TCL_OK) {
+						break;
+					}
+				}
+
 				/* select error */
 				Tcl_SetResult(interp, strerror(errno), TCL_VOLATILE);
 				theResult = TCL_ERROR;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140611/eb93ed10/attachment.html>


More information about the macports-changes mailing list