Skip to content

Commit 0ff12d7

Browse files
committed
syscall: darwin: more complete list of signals
Grepped straight out of the appropriate signal.h, with order and comments preserved verbatim. Makes 1.18 tests happier.
1 parent f159573 commit 0ff12d7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/syscall/syscall_libc_darwin.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,20 @@ const (
7474

7575
type Signal int
7676

77+
// Source: https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/sys/signal.h
7778
const (
78-
SIGCHLD Signal = 0x14
79-
SIGINT Signal = 0x2
80-
SIGKILL Signal = 0x9
81-
SIGTRAP Signal = 0x5
82-
SIGQUIT Signal = 0x3
83-
SIGTERM Signal = 0xf
79+
SIGINT Signal = 2 /* interrupt */
80+
SIGQUIT Signal = 3 /* quit */
81+
SIGILL Signal = 4 /* illegal instruction (not reset when caught) */
82+
SIGTRAP Signal = 5 /* trace trap (not reset when caught) */
83+
SIGABRT Signal = 6 /* abort() */
84+
SIGFPE Signal = 8 /* floating point exception */
85+
SIGKILL Signal = 9 /* kill (cannot be caught or ignored) */
86+
SIGBUS Signal = 10 /* bus error */
87+
SIGSEGV Signal = 11 /* segmentation violation */
88+
SIGPIPE Signal = 13 /* write on a pipe with no one to read it */
89+
SIGTERM Signal = 15 /* software termination signal from kill */
90+
SIGCHLD Signal = 20 /* to parent on child stop or exit */
8491
)
8592

8693
func (s Signal) Signal() {}

0 commit comments

Comments
 (0)