1 -- remove syscall.SIGKILL from list of arguments --
11 c := make(chan os.Signal, 1)
12 signal.Notify(c, os.Interrupt)
13 signal.Ignore() // want `cannot be trapped`
14 signal.Ignore(os.Kill) // want `cannot be trapped`
15 signal.Notify(c, os.Kill) // want `cannot be trapped`
16 signal.Reset(os.Kill) // want `cannot be trapped`
17 signal.Ignore() // want `cannot be trapped`
18 signal.Notify(c) // want `cannot be trapped`
19 signal.Reset() // want `cannot be trapped`
22 -- remove os.Kill from list of arguments --
32 c := make(chan os.Signal, 1)
33 signal.Notify(c, os.Interrupt)
34 signal.Ignore(os.Signal(syscall.SIGKILL)) // want `cannot be trapped`
35 signal.Ignore() // want `cannot be trapped`
36 signal.Notify(c) // want `cannot be trapped`
37 signal.Reset() // want `cannot be trapped`
38 signal.Ignore(syscall.SIGKILL) // want `cannot be trapped`
39 signal.Notify(c, syscall.SIGKILL) // want `cannot be trapped`
40 signal.Reset(syscall.SIGKILL) // want `cannot be trapped`
43 -- use syscall.SIGTERM instead of syscall.SIGKILL --
53 c := make(chan os.Signal, 1)
54 signal.Notify(c, os.Interrupt)
55 signal.Ignore(syscall.SIGTERM) // want `cannot be trapped`
56 signal.Ignore(os.Kill) // want `cannot be trapped`
57 signal.Notify(c, os.Kill) // want `cannot be trapped`
58 signal.Reset(os.Kill) // want `cannot be trapped`
59 signal.Ignore(syscall.SIGTERM) // want `cannot be trapped`
60 signal.Notify(c, syscall.SIGTERM) // want `cannot be trapped`
61 signal.Reset(syscall.SIGTERM) // want `cannot be trapped`
64 -- use syscall.SIGTERM instead of os.Kill --
74 c := make(chan os.Signal, 1)
75 signal.Notify(c, os.Interrupt)
76 signal.Ignore(os.Signal(syscall.SIGKILL)) // want `cannot be trapped`
77 signal.Ignore(syscall.SIGTERM) // want `cannot be trapped`
78 signal.Notify(c, syscall.SIGTERM) // want `cannot be trapped`
79 signal.Reset(syscall.SIGTERM) // want `cannot be trapped`
80 signal.Ignore(syscall.SIGKILL) // want `cannot be trapped`
81 signal.Notify(c, syscall.SIGKILL) // want `cannot be trapped`
82 signal.Reset(syscall.SIGKILL) // want `cannot be trapped`