sigsetjmp implementation

Parker, Ron rdparker@butlermfg.com
Thu May 18 11:40:00 GMT 2000


I was trying to keep the ML traffic down, but decided I should open this up
for discussion.  What follows is basically the discussion Chris and I have
had so far.  It is formatted the way it is because I didn't think you wanted
to read a set of idented replies with top and bottom insertions. :)

*Chris*
Yes.  At some point we should implement a sigsetjmp and siglongjmp.

*Ron* 
I am looking into a patch for this.  However, it does not appear that less
uses sigsetjmp.

I also looked at the Linux headers and noticed two defines, __FAVOR_BSD and
USE_BSD.  The first causes setjmp to behave as sigsetjmp(arg, 1) and the
second implements a _setjmp that behaves as sigsetjmp(arg, 0).  Would this
be the desired behavior?

My real question was do we want to:
A. support the BSD functionality of having setjmp preserve the signal mask
with the additional _setjmp call not preserving the signal mask
B. make that optional behavior like the Linux headers
or
C. ignore what BSD does entirely?

At this point I am leaning to the K.I.S.S option, C.  Just implement
sigsetjmp/siglongjmp and leave setjmp/longjmp behavior alone.

*Chris*
This is really a question for cygwin-developers. However, IMO the
implementation should be equivalent to linux.

*Ron*
Since this discussion I have looked into the cygwin/newlib code and found
sigsetjmp and siglongjmp macros.  It looks to me like they should work but I
have not tested them yet.  Does anyone know if they are broken?  

Either way that still leaves the question about setjmp/longjmp.


More information about the Cygwin-developers mailing list