{"record":{"id":"2688db9f29929ded","repo":"wailsapp/wails","slug":"error-fixing-handler-for-signal-d-please-report","errorCode":null,"errorMessage":"error fixing handler for signal %d, please report this issue to https://github.com/wailsapp/wails: %s\\n","messagePattern":"error fixing handler for signal (.+?), please report this issue to https://github\\.com/wailsapp/wails: (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"v2/internal/frontend/desktop/linux/frontend.go","lineNumber":33,"sourceCode":"#include <errno.h>\n#include <signal.h>\n#include <stdio.h>\n#include <string.h>\n\nstatic void fix_signal(int signum)\n{\n    struct sigaction st;\n\n    if (sigaction(signum, NULL, &st) < 0) {\n        goto fix_signal_error;\n    }\n    st.sa_flags |= SA_ONSTACK;\n    if (sigaction(signum, &st,  NULL) < 0) {\n        goto fix_signal_error;\n    }\n    return;\nfix_signal_error:\n        fprintf(stderr, \"error fixing handler for signal %d, please \"\n                \"report this issue to \"\n                \"https://github.com/wailsapp/wails: %s\\n\",\n                signum, strerror(errno));\n}\n\nstatic void install_signal_handlers()\n{\n#if defined(SIGCHLD)\n    fix_signal(SIGCHLD);\n#endif\n#if defined(SIGHUP)\n    fix_signal(SIGHUP);\n#endif\n#if defined(SIGINT)\n    fix_signal(SIGINT);\n#endif\n#if defined(SIGQUIT)\n    fix_signal(SIGQUIT);","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/wailsapp/wails/blob/0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3/v2/internal/frontend/desktop/linux/frontend.go#L15-L51","documentation":"This is a C-level stderr message from Wails v2's Linux frontend (linux_shared.c-style code embedded in frontend.go): fix_signal() re-installs each inherited signal handler with SA_ONSTACK so the crash handler (SIGSEGV etc.) runs on an alternate stack. The message prints when sigaction() itself fails while reading or modifying a handler, including errno text; it is diagnostic output, not a crash.","triggerScenarios":"Running the binary in environments that block sigaction (some seccomp/container sandboxes return EPERM); a signal number not valid on the kernel in use (EINVAL); running under a supervisor (e.g. certain init systems, gdb, wine) that installed handlers incompatible with modification.","commonSituations":"Docker/gVisor/sandboxes with restricted seccomp profiles; cross-building or running under qemu-user where some signals are absent; the message appears once per signal at startup and the app otherwise works.","solutions":["Treat as a warning first: check whether crash reporting (stack traces on SIGSEGV) still works; if yes, ignore","In containers, relax the seccomp profile to allow sigaction, or run with --security-opt seccomp=unconfined to verify it is the cause","Update Wails — newer versions scope the fix to specific signals and tolerate failure more gracefully","If the environment truly forbids sigaction, accept degraded crash-handler behavior; the app itself keeps running"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Permit sigaction in container/sandbox seccomp profiles","Check that crash stack traces still work; the warning only degrades alternate-stack handling","Keep Wails updated and report recurring cases upstream with signal number and errno"],"tags":["linux","signals","cgo","startup","stderr"],"backgroundTag":null,"analyzedSha":"0e754b1b40ba9044c2a1460e23b7c3de20fc5cf3","analyzedAt":"2026-08-15T14:17:36.034Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}