summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2022-07-12 11:37:48 +0200
committerJason Song <i@wolfogre.com>2022-11-24 08:36:23 +0100
commit08282a519f4ccf8f58574778d0f8a4ba876b7dd0 (patch)
treed5dbafbecad56d9053dc2515e40f116824042033 /main.go
parentlog (diff)
downloadforgejo-runner-08282a519f4ccf8f58574778d0f8a4ba876b7dd0.tar.xz
forgejo-runner-08282a519f4ccf8f58574778d0f8a4ba876b7dd0.zip
stash
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 52e9f94..47349b0 100644
--- a/main.go
+++ b/main.go
@@ -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()