summaryrefslogtreecommitdiff
path: root/internal/debug/signals_windows.go
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 /internal/debug/signals_windows.go
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 'internal/debug/signals_windows.go')
-rw-r--r--internal/debug/signals_windows.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/debug/signals_windows.go b/internal/debug/signals_windows.go
new file mode 100644
index 0000000..89030f3
--- /dev/null
+++ b/internal/debug/signals_windows.go
@@ -0,0 +1,21 @@
+// +build windows
+
+package debug
+
+import (
+ "fmt"
+ "os"
+)
+
+// SetDebugDir sets the directory where debug output files will be written.
+// On Windows, signal handlers are not supported, so this is a no-op.
+func SetDebugDir(dir string) {
+ // No-op on Windows
+}
+
+// InitSignalHandlers sets up signal handlers for runtime diagnostics.
+// On Windows, SIGUSR1 and SIGUSR2 are not available, so this prints a warning.
+func InitSignalHandlers() {
+ fmt.Fprintln(os.Stderr, "debug: signal handlers not supported on Windows")
+ fmt.Fprintln(os.Stderr, "debug: consider using GODEBUG environment variable or pprof HTTP endpoint")
+}