gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r10616: Consider signal interruption


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10616: Consider signal interruption of select as a timeout. Makes klash survive popups.
Date: Mon, 23 Feb 2009 19:04:44 +0100
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10616
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Mon 2009-02-23 19:04:44 +0100
message:
  Consider signal interruption of select as a timeout. Makes klash survive 
popups.
modified:
  libbase/curl_adapter.cpp
=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp  2009-02-11 21:58:37 +0000
+++ b/libbase/curl_adapter.cpp  2009-02-23 18:04:44 +0000
@@ -673,11 +673,23 @@
                int ret = select(maxfd + 1, &readfd, &writefd, &exceptfd, &tv);
                if ( ret == -1 )
                {
-                       // something unexpected happened
-                       boost::format fmt = boost::format(
-                               "error polling data from connection to %s: %s ")
-                               % _url % strerror(errno);
-                       throw GnashException(fmt.str());
+            if ( errno == EINTR )
+            {
+                // we got interupted by a signal
+                // let's consider this as a timeout
+#ifdef GNASH_CURL_VERBOSE
+                log_debug("select() was interrupted by a signal");
+#endif
+                ret = 0;
+            }
+            else
+            {
+                // something unexpected happened
+                boost::format fmt = boost::format(
+                    "error polling data from connection to %s: %s ")
+                    % _url % strerror(errno);
+                throw GnashException(fmt.str());
+            }
                }
                if ( ! ret )
                {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]