$OpenBSD: patch-ext_common_AgentBase_cpp,v 1.3 2011/12/13 18:38:18 jeremy Exp $

Apparently there are issues using sigaltstack with pthreads.

--- ext/common/AgentBase.cpp.orig	Wed Dec 31 16:00:00 1969
+++ ext/common/AgentBase.cpp	Wed Nov 30 10:51:43 2011
@@ -320,10 +320,12 @@ installAbortHandler() {
 	stack.ss_flags = 0;
 	if (sigaltstack(&stack, NULL) != 0) {
 		int e = errno;
-		fprintf(stderr, "Cannot install an alternative stack for use in signal handlers: %s (%d)\n",
-			strerror(e), e);
-		fflush(stderr);
-		abort();
+		if (e != EINVAL) {
+			fprintf(stderr, "Cannot install an alternative stack for use in signal handlers: %s (%d)\n",
+				strerror(e), e);
+			fflush(stderr);
+			abort();
+		}
 	}
 	
 	struct sigaction action;
