Skip to content

Commit 9ef1455

Browse files
neelanceRichard Musiol
authored and
Richard Musiol
committed
syscall: add dummy SIGTERM constant to js/wasm
The js/wasm architecture does not support signals at all, but there are already some signal constants defined because of stdlib dependencies. This change adds a dummy constant for syscall.SIGTERM as well, to make js/wasm compatible with more existing Go code. There is the Go proverb "Syscall must always be guarded with build tags.", so code should not expect syscall.SIGTERM to exist. Still, adding SIGTERM should do more good than harm. Fixes #28719. Change-Id: I3554b484f96a21427491c04eb1dd57e7af5bd62f Reviewed-on: https://go-review.googlesource.com/c/150477 Run-TryBot: Richard Musiol <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent d7183ca commit 9ef1455

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/syscall/syscall_js.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const (
7474
SIGKILL
7575
SIGTRAP
7676
SIGQUIT
77+
SIGTERM
7778
)
7879

7980
func (s Signal) Signal() {}

0 commit comments

Comments
 (0)