mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-12 01:27:13 +02:00
3
main.go
3
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()
|
||||
|
Reference in New Issue
Block a user