openbsd-ports/www/ruby-passenger/patches/patch-ext_common_AgentBase_cpp
william cb29cc2d52 Update to passenger 3.0.7
Ignore EINVAL from sigaltstack, seems to be what ruby itself does in 1.9

committing on behalf of jeremy@, who did all the work,
tested on i386 and tested packaging on amd64.  All so I can commit a
simple nginx update... THANKS.

ok jasper
2011-05-17 03:25:18 +00:00

24 lines
744 B
Plaintext

$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;