Some promising ideas… The main package would have to be changed slightly: func main() { becomes func main() {} //go:export Main func Main() { and in the C program, install the signal handler and then call the Main function.
-- Though the signal handler should be installed according to the guidance in https://pkg.go.dev/os/signal. Hopefully the Go runtime does not make any conflicting use of SIGSYS… Posting this information in case anyone else might want to figure out how to use LD_PRELOAD with Go. Peter Sent from my iPhone On Aug 23, 2024, at 8:21 PM, Peter JIN <pjin0...@gmail.com> wrote:
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/631FD2BE-C9C3-465E-ADEF-2D8F3E8F7B1B%40gmail.com. |
- [go-nuts] LD_PRELOAD yet again Peter JIN
- Re: [go-nuts] LD_PRELOAD yet again Peter JIN