Signed-off-by: Bo-Yi Wu <[email protected]>
This commit is contained in:
Bo-Yi Wu authored and Jason Song committed 2022-11-24 15:36:23 +08:00
1 parent db7ee2eaf4
commit 08282a519f
2 files changed
+11 -19

No files matched your search

+2 -1
View File
@@ -4,6 +4,7 @@ import (
"context"
"os"
"os/signal"
"syscall"
"gitea.com/gitea/act_runner/cmd"
)
@@ -14,7 +15,7 @@ func main() {
// trap Ctrl+C and call cancel on the context
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
defer func() {
signal.Stop(c)
cancel()