{"record":{"id":"c940b92a778e0749","repo":"wavetermdev/waveterm","slug":"sending-signals-is-not-supported-on-windows","errorCode":null,"errorMessage":"sending signals is not supported on Windows","messagePattern":"sending signals is not supported on Windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/util/unixutil/unixutil_windows.go","lineNumber":49,"sourceCode":"func SignalTerm(pid int) error {\n\tproc, err := os.FindProcess(pid)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn proc.Kill()\n}\n\n// this is a no-op on windows\nfunc SignalHup(pid int) error {\n\treturn nil\n}\n\nfunc IsPidRunning(pid int) bool {\n\treturn false\n}\n\nfunc SendSignalByName(pid int, sigName string) error {\n\treturn fmt.Errorf(\"sending signals is not supported on Windows\")\n}\n","sourceCodeStart":31,"sourceCodeEnd":51,"githubUrl":"https://github.com/wavetermdev/waveterm/blob/a4447c1563b2df285ab89e76c82f91e1a1a49c1e/pkg/util/unixutil/unixutil_windows.go#L31-L51","documentation":"SendSignalByName on Windows is a stub that unconditionally returns this error: POSIX signal delivery is not implemented for the Windows build. Like the group-id stub, every call on Windows fails regardless of arguments.","triggerScenarios":"Any invocation of SendSignalByName in a Windows build — e.g. RemoteProcessSignalCommand dispatched on a Windows server, or frontend code offering a \"kill process\" action without checking the host OS.","commonSituations":"Remote terminal products whose server runs on Windows; users clicking a signal button in the UI against a Windows backend; feature flags not scoped by platform.","solutions":["Check the host OS before offering/exposing signal functionality; hide or disable the action on Windows","Implement Windows termination via other APIs: os.Process.Kill, GenerateConsoleCtrlEvent, or taskkill /PID","Return the OS limitation to the user with an actionable alternative (e.g. \"force-kill supported instead\")","Add a build-tagged Windows implementation if graceful signaling becomes a requirement"],"exampleFix":"// before\nerr := unixutil.SendSignalByName(pid, \"SIGTERM\") // errors on windows\n// after\nif runtime.GOOS == \"windows\" {\n    p, perr := os.FindProcess(pid)\n    if perr == nil {\n        err = p.Kill() // hard kill substitute\n    }\n} else {\n    err = unixutil.SendSignalByName(pid, \"SIGTERM\")\n}","handlingStrategy":"fallback","validationCode":"if runtime.GOOS == \"windows\" {\n    return errors.New(\"signal delivery not available on windows; use force-kill\")\n}","typeGuard":"func signalingSupported() bool { return runtime.GOOS != \"windows\" }","tryCatchPattern":"if err := unixutil.SendSignalByName(pid, sig); err != nil {\n    if strings.Contains(err.Error(), \"not supported on Windows\") {\n        p, _ := os.FindProcess(pid)\n        _ = p.Kill() // windows fallback\n    }\n}","preventionTips":["Hide/Disable signal actions in UI when host OS is windows","Implement os.Process.Kill or taskkill fallbacks for windows","Test remote-process features on all target platforms"],"tags":["windows","signals","process","platform-support","go"],"backgroundTag":"unsupported-on-windows","analyzedSha":"a4447c1563b2df285ab89e76c82f91e1a1a49c1e","analyzedAt":"2026-09-01T15:26:23.972Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}