SIGINT, longjmp

Hal Murray hmurray at megapathdsl.net
Tue Jan 26 21:38:52 UTC 2016


kurt at roeckx.be said:
> It's not clear to me when this longjmp() is called.  But if changing to
> siglongjmp() fixed it, it seems the signal handling got changed in between? 

It's called from the ^C signal handler.  It's the brute force way of 
terminating a command.

I haven't found anyplace in our code that messes with the signal mask.  I 
could easily be overlooking something that will be obvious in hindsight.

Nor have I found the API specs that mention this tangle.  There is an 
opportunity for storage leaks if a routine returns storage that should be 
free-ed or even uses/frees storage internally.

I'm fishing for a list of routines that shouldn't be used with longjmp similar to the list that shouldn't be used with threads, or rather for the discussion of that list.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list