> > It appears as though the signal handler is somehow not running on the > alternate signal stack. I don't know why that would be, though. I > have no other explanation. You'll have to debug it. > > I can see by the stack pointers, that the alt stack is used on both, Linux and Darwin. But I'm not familiar enough with the internals to debug why it calls morestack/newstack.
> What you are doing seems rather dubious but I can't think of any > reason why it shouldn't work. Maybe you can shortly explain, why you think its dubious. I am calling a shared C lib from Go, that spawns its own threads, and also calls back into Go. According to the signal package documentation, registering a C signal handler seems to be the only way to handle crashes in foreign threads. As I want all non-Go threads to be dumped as well in case of a signal raised in Go, I register the C handlers after the Go handlers. And instead of raising the signal again, I call the Go handler directly to keep the original mcontext. Do you think there's a better way to do it? Thanks! Martin -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.