1
0
mirror of https://github.com/golang/go synced 2024-11-07 15:46:23 -07:00
go/misc
Richard Musiol 9e2a4f4dff syscall: remove support for O_NONBLOCK and O_SYNC on js/wasm
This commit removes O_NONBLOCK on js/wasm. O_SYNC can't be
removed, because it is referenced by the os package, so instead
its use returns an error.

On Windows, the options O_NONBLOCK and O_SYNC are not available
when opening a file with Node.js. This caused the initialization
of the syscall package to panic.

The simplest solution is to not support these two options on js/wasm
at all. Code written for js/wasm is supposed to be portable,
so platform-specific options should not be used.

Fixes #26524.

Change-Id: I366aa3cdcfa59dfa9dc513368259f363ca090f00
Reviewed-on: https://go-review.googlesource.com/126600
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-07-31 17:03:39 +00:00
..
android misc/android: forward SIGQUIT to the process running on the device 2018-05-23 18:18:39 +00:00
arm
cgo cmd/cgo: don't resolve typedefs in -godefs mode 2018-07-27 16:46:42 +00:00
chrome/gophertool
git
ios misc/ios: forward SIGQUIT to the iOS program 2018-05-11 16:47:28 +00:00
linkcheck
nacl all: use HTTPS for iana.org links 2018-02-13 18:36:48 +00:00
sortac
swig cmd/go: fix swig support and run swig tests during run.bash 2017-11-16 17:19:19 +00:00
trace misc/trace: update trace_viewer_full.html 2018-04-26 20:26:23 +00:00
wasm syscall: remove support for O_NONBLOCK and O_SYNC on js/wasm 2018-07-31 17:03:39 +00:00
benchcmp
editors