$OpenBSD: patch-ext_common_AgentBase_cpp,v 1.2 2011/05/17 03:25:18 william Exp $

Apparently there are issues using sigaltstack with pthreads.

--- ext/common/AgentBase.cpp.orig	Wed Apr 27 12:51:06 2011
+++ ext/common/AgentBase.cpp	Wed Apr 27 12:51:20 2011
@@ -302,10 +302,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;
