From: Richard Musiol Date: Tue, 20 Nov 2018 15:37:50 +0000 (+0100) Subject: syscall: add dummy SIGTERM constant to js/wasm X-Git-Tag: go1.12beta1~300 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9ef145532420409a60542ec69ae3ed20a7d7c401;p=gostls13.git 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 --- 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() {}