libi2ncommon: (reinhard) workaround for glibc weirdness..
authorReinhard Pfau <reinhard.pfau@intra2net.com>
Mon, 18 Aug 2008 12:09:17 +0000 (12:09 +0000)
committerReinhard Pfau <reinhard.pfau@intra2net.com>
Mon, 18 Aug 2008 12:09:17 +0000 (12:09 +0000)
src/signalfunc.cpp

index 157a9db..ed0f544 100644 (file)
@@ -304,6 +304,12 @@ bool install_signal_handler(
             original_signal_action[signum] = *old_action;
         }
     }
+    else if (res > 0)
+    {
+        // some glibc's seem to return the errno instead of storing
+        // it in the appropriate var... *sigh*
+        errno = res;
+    }
     return (0 == res);
 } // eo install_signal_handler(int,sigaction&)