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

Function GetSignalName

pkg/util/unixutil/unixutil_unix.go:45–58  ·  view source on GitHub ↗
(sig os.Signal)

Source from the content-addressed store, hash-verified

43}
44
45func GetSignalName(sig os.Signal) string {
46 if sig == nil {
47 return ""
48 }
49 scSig, ok := sig.(syscall.Signal)
50 if !ok {
51 return sig.String()
52 }
53 name := unix.SignalName(scSig)
54 if name == "" {
55 return fmt.Sprintf("%d", int(scSig))
56 }
57 return name
58}
59
60func SetCloseOnExec(fd int) {
61 unix.CloseOnExec(fd)

Callers 2

ExitSignalMethod · 0.92
waitForProcessMethod · 0.92

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected