]> Cypherpunks repositories - gostls13.git/commit
syscall: implement wasip1 Fcntl
authorChris O'Hara <cohara87@gmail.com>
Thu, 25 May 2023 02:07:07 +0000 (12:07 +1000)
committerGopher Robot <gobot@golang.org>
Fri, 26 May 2023 17:59:52 +0000 (17:59 +0000)
commit7756f825905d047a93abfb30f6da57881b7b9669
tree0785ac67439849b0980a8f711b214ffc15925251
parent188066cfbc2589e82de9325f9d7a21a9a1043bbd
syscall: implement wasip1 Fcntl

CL 494915 broke non-blocking I/O on wasip1 for files
opened with os.NewFile. This is fixed by providing an
implementation of fcntl(F_GETFL) for wasip1.

Change-Id: I78979076b95495fd4b94814552e5f5b043270cd0
Reviewed-on: https://go-review.googlesource.com/c/go/+/498195
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Achille Roussel <achille.roussel@gmail.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
src/internal/syscall/unix/fcntl_js.go [moved from src/internal/syscall/unix/fcntl_wasm.go with 92% similarity]
src/internal/syscall/unix/fcntl_wasip1.go [new file with mode: 0644]
src/runtime/internal/wasitest/nonblock_test.go
src/runtime/internal/wasitest/testdata/nonblock.go