diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2022-07-12 11:37:48 +0200 |
---|---|---|
committer | Jason Song <i@wolfogre.com> | 2022-11-24 08:36:23 +0100 |
commit | 08282a519f4ccf8f58574778d0f8a4ba876b7dd0 (patch) | |
tree | d5dbafbecad56d9053dc2515e40f116824042033 /main.go | |
parent | log (diff) | |
download | forgejo-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.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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() |