aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/encoding.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2023-05-22 20:37:05 +0200
committerGopher Robot <gobot@golang.org>2023-05-23 19:42:05 +0000
commit3c3a883667390c2f03dffb3fdcb4fa4172cb23e6 (patch)
tree7cae32ce54b521747afcb3f0b096f25c27d9bd61 /src/encoding/encoding.go
parentc0b860ba313e57e6f57d98d12a0174a024473e0a (diff)
downloadgo-3c3a883667390c2f03dffb3fdcb4fa4172cb23e6.tar.xz
os: avoid second fcntl syscall in NewFile on unix
CL 494915 introduced an additional fcntl(F_GETFL) syscall to determine whether the file is in append-only mode. The existing unix.IsNonblock call also issues an fcntl(F_GETFL) syscall. The two can be combined and both the append-only mode and the non-blocking flags can be determined from that syscall's result. Change-Id: I915589ed94e079f6abaa2fd0032ef01f78698f7f Reviewed-on: https://go-review.googlesource.com/c/go/+/497075 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/encoding/encoding.go')
0 files changed, 0 insertions, 0 deletions