summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-04 09:11:30 +0200
committerPaul Buetow <paul@buetow.org>2026-02-04 09:11:30 +0200
commit288aa24e8bc4f22cb7de5d60789e1d6ec79f7395 (patch)
treebe644130fbffaf946e3122ffdf89dc203447124a /cmd
parent6d8953d52efa6037b679d7a722b060c687843f3a (diff)
add runtime debugging signals and convert to magev0.10.0
- Add SIGUSR1 handler for goroutine stack dumps when app hangs - Add SIGUSR2 handler for full profiling (heap, cpu, block) - Add --debug-dir flag for configurable debug output location - Convert build system from go-task to mage - Update documentation with debugging workflow - Bump version to 0.10.0
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tasksamurai/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go
index b964f52..96c8be8 100644
--- a/cmd/tasksamurai/main.go
+++ b/cmd/tasksamurai/main.go
@@ -7,6 +7,7 @@ import (
"runtime"
+ "codeberg.org/snonux/tasksamurai/internal/debug"
"codeberg.org/snonux/tasksamurai/internal/task"
"codeberg.org/snonux/tasksamurai/internal/ui"
@@ -21,6 +22,7 @@ func main() {
}
debugLog := flag.String("debug-log", "", "path to debug log file")
+ debugDir := flag.String("debug-dir", "", "directory for runtime debug output (goroutine dumps, profiles)")
browserCmd := flag.String("browser-cmd", browserCmdDefault, "command used to open URLs")
disco := flag.Bool("disco", false, "enable disco mode")
flag.Parse()
@@ -30,6 +32,10 @@ func main() {
os.Exit(1)
}
+ // Set up runtime debugging signal handlers
+ debug.SetDebugDir(*debugDir)
+ debug.InitSignalHandlers()
+
m, err := ui.New(flag.Args(), *browserCmd)
if err != nil {
fmt.Fprintln(os.Stderr, "failed to load tasks:", err)