signal handling between Cgo and Go

138 views
Skip to first unread message

melod...@gmail.com

unread,
Oct 9, 2017, 6:39:39 PM10/9/17
to golang-dev
Hi All,

I am writing a go function which will call cgo. Here I on purpose to write the code divided by zero in C function. 
I received the signal SIGBUS, then go will generate a panic. 

I did not see any document which describes the singal handling between Cgo and Go. 

I dont understand how these work, anyone could give any idea? I did see the document that the synchronous signal would generate panic at the runtime. 
What i want to know is how this signal is generated, how the signal is sent to go program, how go handle it. 

thanks
Melody

Ian Lance Taylor

unread,
Oct 10, 2017, 10:43:07 AM10/10/17
to Huibo Wang, golang-dev
First, this is the wrong mailing list. golang-dev is for the
development of the Go tools and standard library. The right mailing
is golang-nuts. Please take any followups to golang-nuts. Thanks.

Second, the documentation is at https://golang.org/pkg/os/signal . If
that documentation is unclear, please ask on golang-nuts.

Ian
Reply all
Reply to author
Forward
0 new messages