no catch sigint

master
Bel LaPointe 2024-11-18 06:51:17 -07:00
parent 9de277a879
commit 3e36e53805
1 changed files with 1 additions and 6 deletions

View File

@ -5,17 +5,12 @@ import (
"fmt" "fmt"
"log" "log"
"os" "os"
"os/signal"
"syscall"
"ffmpeg.d/pkg/fs" "ffmpeg.d/pkg/fs"
) )
func main() { func main() {
ctx, can := signal.NotifyContext(context.Background(), syscall.SIGINT) if err := Run(context.Background(), os.Args[1:]); err != nil {
defer can()
if err := Run(ctx, os.Args[1:]); err != nil {
panic(err) panic(err)
} }
} }