From 9ef145532420409a60542ec69ae3ed20a7d7c401 Mon Sep 17 00:00:00 2001 From: Richard Musiol Date: Tue, 20 Nov 2018 16:37:50 +0100 Subject: [PATCH] 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 Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/syscall/syscall_js.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/syscall/syscall_js.go b/src/syscall/syscall_js.go index 6822eec835..2e1a9ec9f1 100644 --- a/src/syscall/syscall_js.go +++ b/src/syscall/syscall_js.go @@ -74,6 +74,7 @@ const ( SIGKILL SIGTRAP SIGQUIT + SIGTERM ) func (s Signal) Signal() {} -- 2.50.0