Closed pavel-odintsov closed 9 years ago
More details here: https://github.com/golang/go/issues/12873
Fixed :) I have moved to dynamic linking in runtime with dlopen/dlsym and fixed all issues: https://github.com/pavel-odintsov/gobgp_api_cpp_client/blob/master/gobgp_api_client.cc#L265 :)
Hello!
I have tested my integration with C++ project and found huge amount off issues related with golang .so implementation.
So when we create libgobgp.so we attach full Go's runtime to C++ application. It's not a simple code which could be called like native C .so file.
You could look on example application which linked to libgobgp:
As you can see we have 5 threads from Golang and only single thread about app itself.
So it's not a problem itself. But Golang runtime redefine all signals and actions and broke popen (they related with SIGCHLD handler code used in pope) capability and daemoization code from my application.
I suggest to create native C library for encoding/decoding BGP structures.... But it's really complex... :(