MCPcopy Create free account
hub / github.com/coder/coder / osSignalFrom

Function osSignalFrom

agent/agentssh/signal_other.go:12–45  ·  view source on GitHub ↗
(sig ssh.Signal)

Source from the content-addressed store, hash-verified

10)
11
12func osSignalFrom(sig ssh.Signal) os.Signal {
13 switch sig {
14 case ssh.SIGABRT:
15 return unix.SIGABRT
16 case ssh.SIGALRM:
17 return unix.SIGALRM
18 case ssh.SIGFPE:
19 return unix.SIGFPE
20 case ssh.SIGHUP:
21 return unix.SIGHUP
22 case ssh.SIGILL:
23 return unix.SIGILL
24 case ssh.SIGINT:
25 return unix.SIGINT
26 case ssh.SIGKILL:
27 return unix.SIGKILL
28 case ssh.SIGPIPE:
29 return unix.SIGPIPE
30 case ssh.SIGQUIT:
31 return unix.SIGQUIT
32 case ssh.SIGSEGV:
33 return unix.SIGSEGV
34 case ssh.SIGTERM:
35 return unix.SIGTERM
36 case ssh.SIGUSR1:
37 return unix.SIGUSR1
38 case ssh.SIGUSR2:
39 return unix.SIGUSR2
40
41 // Unhandled, use sane fallback.
42 default:
43 return unix.SIGKILL
44 }
45}

Callers 1

handleSignalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected