Skip to content

Commit 26d7215

Browse files
committed
syscall: wasi: more complete list of signals
Grepped straight out of the appropriate signal.h, with order preserved. Makes 1.18 tests happier. See comment on discrepancy for SIGCHLD. Since wasi doesn't really support signals, this may not matter.
1 parent 7817b33 commit 26d7215

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/syscall/syscall_libc_wasi.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,24 @@ import (
99
)
1010

1111
// https://github.com/WebAssembly/wasi-libc/blob/main/expected/wasm32-wasi/predefined-macros.txt
12+
// disagrees with ../../lib/wasi-libc/libc-top-half/musl/arch/wasm32/bits/signal.h for SIGCHLD?
13+
// https://github.com/WebAssembly/wasi-libc/issues/271
1214

1315
type Signal int
1416

1517
const (
16-
SIGCHLD Signal = 16
1718
SIGINT Signal = 2
18-
SIGKILL Signal = 9
19-
SIGTRAP Signal = 5
2019
SIGQUIT Signal = 3
20+
SIGILL Signal = 4
21+
SIGTRAP Signal = 5
22+
SIGABRT Signal = 6
23+
SIGBUS Signal = 7
24+
SIGFPE Signal = 8
25+
SIGKILL Signal = 9
26+
SIGSEGV Signal = 11
27+
SIGPIPE Signal = 13
2128
SIGTERM Signal = 15
29+
SIGCHLD Signal = 17
2230
)
2331

2432
func (s Signal) Signal() {}

0 commit comments

Comments
 (0)