Hi Ian! Thank you for your answer.
I was trying to find any resource on Internet about long jumps and
"import C" but neither in official Go documentation nor in any other
blog post is written about it.
There are many resources how Go is (fully) compatible with C and can
call C functions, but absolutely zero information how it is implemented
nor what would happen with such core feature of C language as long jumps
or signals.
> Certainly no Go deferred functions will be run. I don't think this
> would break the garbage collector as such, but I expect that it would
> break the Go scheduler. In the best case you'll be left with a
> dangling goroutine that will never be run and never go away.
So should I interpret your answer as long jumps are not supported and
caller of C function from Go must ensure that called C function would
not call longjmp()?
And another interesting question, it is possible to call longjmp() from
Go code? To throw C exception back to the main C application.