From: ts Date: 2004-04-08T22:41:50+09:00 Subject: Re: OpenBSD / Sparc >>>>> "Y" == Yukihiro Matsumoto writes: Y> Yes, Ruby uses _setjmp()/_longjmp() where available, because we need Y> not to save signal context. Is there any problem? Just a small problem obsd% cat b.rb #!./ruby require 'timeout' Timeout::timeout(5) { p 45 } obsd% obsd% ~/local/r19/bin/ruby -v b.rb ruby 1.9.0 (2004-04-07) [sparc-openbsd3.4] longjmp botch. Illegal instruction (core dumped) obsd% obsd% diff -u eval.c.~1.657.~ eval.c --- eval.c.~1.657.~ Wed Apr 7 08:30:13 2004 +++ eval.c Thu Apr 8 15:10:02 2004 @@ -111,7 +111,7 @@ #else typedef jmp_buf rb_jmpbuf_t; #ifndef setjmp -#ifdef HAVE__SETJMP +#ifdef HAVE___SETJMP #define setjmp(env) _setjmp(env) #define longjmp(env,val) _longjmp(env,val) #endif obsd% obsd% ./ruby b.rb 45 obsd% Now on OpenBSD _setjmp() dont save signal context The setjmp()/longjmp() function pairs save and restore the signal mask while _setjmp()/_longjmp() function pairs save and restore only the reg- ister set and the stack (see sigmask(3)). Guy Decoux