searKing / go-issue-call-go-in-c-signal-handler

This repository contains an example of the problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-issue-call-go-in-c-signal-handler

This repository contains an example of the problem

  • ExampleTestCHandlerCalledByCSignal calls c function in c signal handler, passed
  • ExampleTestGoHandlerCalledByCSignal calls go function in c signal handler, blocked forever
  • ExampleTestGoHandlerCalledByCSignalWithSigAltStack calls go function in c signal handler, with sigaltstack called before sigaction, blocked forever

Execute as a binary

  • signal.TestCHandlerCalledByCSignal is executed
  • signal.TestGoHandlerCalledByCSignal is commented out
  • signal.TestGoHandlerCalledByCSignalWithSigAltStack is commented out

About

This repository contains an example of the problem

License:MIT License


Languages

Language:Go 72.1%Language:C++ 14.1%Language:C 13.8%