MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / SendSignalByName

Function SendSignalByName

pkg/util/unixutil/unixutil_unix.go:84–94  ·  view source on GitHub ↗
(pid int, sigName string)

Source from the content-addressed store, hash-verified

82}
83
84func SendSignalByName(pid int, sigName string) error {
85 sig := ParseSignal(sigName)
86 if sig == nil {
87 return fmt.Errorf("unsupported or invalid signal %q", sigName)
88 }
89 p, err := os.FindProcess(pid)
90 if err != nil {
91 return fmt.Errorf("process %d not found: %w", pid, err)
92 }
93 return p.Signal(sig)
94}

Callers 1

Calls 1

ParseSignalFunction · 0.70

Tested by

no test coverage detected