I am trying to extend a old c program with go.    Add websocket ability to 
this c program.
first  build  go as a  .so  dynamic lib
then link the so lib in c program
I run the cgo ok in an example program.
But when integrate with old c program,  c program will send a signal 42 to 
itself periodly. 
this cause so lib terminate 

rogram received signal SIG42, Real-time event 42.
[Switching to Thread 0xa53c6b70 (LWP 14957)]
runtime.futex () at /usr/local/go/src/runtime/sys_linux_386.s:444
444 /usr/local/go/src/runtime/sys_linux_386.s: No such file or directory.
in /usr/local/go/src/runtime/sys_linux_386.s
Missing separate debuginfos, use: debuginfo-install WBXcms-3.7.0-494.i686
(gdb) bt
#0 runtime.futex () at /usr/local/go/src/runtime/sys_linux_386.s:444
#1 0xb7b04c2a in runtime.futexsleep (addr=0xb7fa47ac, val=0, ns=-1) at 
/usr/local/go/src/runtime/os_linux.go:46
#2 0xb7ae5437 in runtime.notesleep (n=0xb7fa47ac) at 
/usr/local/go/src/runtime/lock_futex.go:151
#3 0xb7b0c8f4 in runtime.stopm () at /usr/local/go/src/runtime/proc.go:1936
#4 0xb7b0d848 in runtime.findrunnable (gp=@0x74421300, inheritTime=@0x0) at 
/usr/local/go/src/runtime/proc.go:2399
#5 0xb7b0e507 in runtime.schedule () at 
/usr/local/go/src/runtime/proc.go:2525
#6 0xb7b0edac in runtime.goexit0 (gp=0x744000e0) at 
/usr/local/go/src/runtime/proc.go:2722
#7 0xb7b2f868 in runtime.mcall () at /usr/local/go/src/runtime/asm_386.s:345
#8 0xb7b2f7c0 in runtime.rt0_go () at 
/usr/local/go/src/runtime/asm_386.s:241
#9 0xb7b2f7c7 in runtime.rt0_go () at 
/usr/local/go/src/runtime/asm_386.s:246
#10 0x00

My question is 
*how go so lib ignore this signal 42,  and pass the signal handle to old c 
program.*

Thanks

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/22745e49-1d43-4e3a-9d78-20ff6bb20d4e%40googlegroups.com.

Reply via email to