From e259598b682b6527c9df171751bb706815fe72fc Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sat, 19 Mar 2022 13:22:32 -0700 Subject: [PATCH] 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. --- src/syscall/syscall_libc_darwin.go | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/syscall/syscall_libc_darwin.go b/src/syscall/syscall_libc_darwin.go index d3ec6376..770e71b5 100644 --- a/src/syscall/syscall_libc_darwin.go +++ b/src/syscall/syscall_libc_darwin.go @@ -74,13 +74,20 @@ const ( type Signal int +// Source: https://opensource.apple.com/source/xnu/xnu-7195.81.3/bsd/sys/signal.h const ( - SIGCHLD Signal = 0x14 - SIGINT Signal = 0x2 - SIGKILL Signal = 0x9 - SIGTRAP Signal = 0x5 - SIGQUIT Signal = 0x3 - SIGTERM Signal = 0xf + SIGINT Signal = 2 /* interrupt */ + SIGQUIT Signal = 3 /* quit */ + SIGILL Signal = 4 /* illegal instruction (not reset when caught) */ + SIGTRAP Signal = 5 /* trace trap (not reset when caught) */ + SIGABRT Signal = 6 /* abort() */ + SIGFPE Signal = 8 /* floating point exception */ + SIGKILL Signal = 9 /* kill (cannot be caught or ignored) */ + SIGBUS Signal = 10 /* bus error */ + SIGSEGV Signal = 11 /* segmentation violation */ + SIGPIPE Signal = 13 /* write on a pipe with no one to read it */ + SIGTERM Signal = 15 /* software termination signal from kill */ + SIGCHLD Signal = 20 /* to parent on child stop or exit */ ) func (s Signal) Signal() {}