mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 16:20:29 +00:00
1 parent
db7ee2eaf4
commit
08282a519f
2 files changed
+11
-19
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user