I would strongly advise avoiding unix-signals from CGO. I've done it and
can recommend against it (it needs very elaborate signal masking to avoid
crashing the Go runtime); it was still very fraught and probably not
supported :)
Just catch C-side exceptions in C, turn them into strings, pass t
After more reading, if you install the vectored exception handler it should work as it can receive the exceptions outside its own stack frames. On Jan 19, 2025, at 7:47 AM, Robert Engels wrote:Read this section: Go handles the exceptions listed otherwise this is the process:Raising an exception c
Read this section: Go handles the exceptions listed otherwise this is the process:Raising an exception causes the exception dispatcher to go through the following search for an exception handler:The system first attempts to notify the process's debugger, if any.If the process is not being debugged,
You need to install a handler using CGO. When it is not a Go exception it uses “continue” - eventually your handler will be called. You handle it in the native Go and communicate the signal back to Go using a channel of some other means. A lot depends on what you are trying to do and why? Why not j
I investigated a little bit and got lost :p
Basically I raise a windows exception with RaiseException windows API to
simulate my exception
(https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-raiseexception)
>From what I understand, Go search the exception hand