Skip to content

Commit

Permalink
syscall: add dummy SIGTERM constant to js/wasm
Browse files Browse the repository at this point in the history
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 golang#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]>
  • Loading branch information
neelance authored and Richard Musiol committed Nov 20, 2018
1 parent d7183ca commit 9ef1455
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/syscall/syscall_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const (
SIGKILL
SIGTRAP
SIGQUIT
SIGTERM
)

func (s Signal) Signal() {}
Expand Down

0 comments on commit 9ef1455

Please sign in to comment.