{"record":{"id":"aab9e5e457825102","repo":"gastownhall/beads","slug":"procid-unsupported-signal-v","errorCode":null,"errorMessage":"procid: unsupported signal %v","messagePattern":"procid: unsupported signal (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/procid/procid_darwin.go","lineNumber":65,"sourceCode":"\t\treturn nil, err\n\t}\n\tif !match {\n\t\treturn nil, fmt.Errorf(\"procid: process %d does not match token\", pid)\n\t}\n\treturn &Handle{pid: pid, token: tok}, nil\n}\n\nfunc (h *Handle) Signal(sig os.Signal) error {\n\tmatch, err := Verify(h.pid, h.token)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !match {\n\t\treturn fmt.Errorf(\"procid: process %d no longer matches token\", h.pid)\n\t}\n\tunixSig, ok := sig.(syscall.Signal)\n\tif !ok {\n\t\treturn fmt.Errorf(\"procid: unsupported signal %v\", sig)\n\t}\n\tif err := syscall.Kill(h.pid, unixSig); err != nil {\n\t\tif isFatalSignal(unixSig) && errors.Is(err, unix.ESRCH) {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"procid: signal %d: %w\", h.pid, err)\n\t}\n\tif isFatalSignal(unixSig) {\n\t\treturn h.confirmFatalSignal()\n\t}\n\tmatch, err = Verify(h.pid, h.token)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !match {\n\t\treturn fmt.Errorf(\"procid: process %d no longer matches token\", h.pid)\n\t}\n\treturn nil","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/procid/procid_darwin.go#L47-L83","documentation":"Handle.Signal only supports signals representable as syscall.Signal (real Unix signals). If the caller passes an os.Signal implementation that is not a syscall.Signal, the library cannot convert it for syscall.Kill and returns this error without signaling anything.","triggerScenarios":"Calling Handle.Signal with a custom type implementing os.Signal (e.g. a wrapper or a non-Unix signal constant) instead of syscall.SIGKILL/syscall.SIGTERM or another syscall.Signal value.","commonSituations":"Passing signals from an abstraction layer over os/exec or a cross-platform signal enum; passing nil or a mock signal in tests; passing a Windows-style signal value on darwin builds.","solutions":["Pass values of type syscall.Signal, e.g. syscall.SIGTERM, syscall.SIGKILL.","Convert your abstraction to syscall.Signal before calling: syscall.Signal(int(mySig)).","Check your signal constants are not redefined in a custom package; import syscall and use its constants."],"exampleFix":"// before\nvar mySignal os.Signal = myPkg.Signal(\"terminate\")\nh.Signal(mySignal) // unsupported signal\n// after\nimport \"syscall\"\nh.Signal(syscall.SIGTERM)","handlingStrategy":"validation","validationCode":"sig, ok := mySignal.(syscall.Signal)\nif !ok {\n    return fmt.Errorf(\"only syscall.Signal values are supported, got %T\", mySignal)\n}","typeGuard":"func isUnixSignal(s os.Signal) bool {\n    _, ok := s.(syscall.Signal)\n    return ok\n}","tryCatchPattern":"if err := h.Signal(sig); err != nil {\n    if strings.Contains(err.Error(), \"unsupported signal\") {\n        return fmt.Errorf(\"convert %T to syscall.Signal before calling Signal\", sig)\n    }\n    return err\n}","preventionTips":["Always pass syscall.SIG* constants to Signal","Add a unit test asserting your signal values pass isUnixSignal","Avoid custom os.Signal wrapper types","Convert app-level signal enums to syscall.Signal at the boundary"],"tags":["signal","type-mismatch","darwin"],"backgroundTag":"unsupported-signal-type","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}