]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.22: document syscall changes
authorMichael Pratt <mpratt@google.com>
Mon, 11 Dec 2023 20:03:39 +0000 (15:03 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 11 Dec 2023 20:30:39 +0000 (20:30 +0000)
For #61422.

Change-Id: I976b8cc14893b91e5140c7b53d0773bca57cb19d
Reviewed-on: https://go-review.googlesource.com/c/go/+/548936
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
doc/go1.22.html

index 631184a0e802c963af5b5c74c5a16da2b964b9bb..0b222a2e49590366d381e79e5f84adbbebf59c56 100644 (file)
@@ -655,6 +655,10 @@ defer func() {
       <code>IO_REPARSE_TAG_MOUNT_POINT</code> reparse points.
     </p>
 
+    <p><!-- CL 541015 -->
+      On Windows, passing <a href="/pkg/os#O_SYNC"><code>O_SYNC</code></a> to <a href="/pkg/os#OpenFile"><code>OpenFile</code></a> now causes write operations to go directly to disk, equivalent to <code>O_SYNC</code> on Unix platforms.
+    </p>
+
     <p><!-- https://go.dev/issue/58808 -->
       TODO: <a href="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
     </p>
@@ -809,15 +813,18 @@ defer func() {
 <dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
   <dd>
     <p><!-- https://go.dev/issue/60797 -->
-      TODO: <a href="https://go.dev/issue/60797">https://go.dev/issue/60797</a>: undeprecate
+      The <code>syscall</code> package has been <a href="https://golang.org/s/go1.4-syscall">frozen</a> since Go 1.4 and was marked as deprecated in Go 1.11, causing many editors to warn about any use of the package.
+      However, some non-deprecated functionality requires use of the <code>syscall</code> package, such as the <a href="/pkg/os/exec#Cmd"><code>os/exec.Cmd.SysProcAttr</code></a> field.
+      To avoid unnecesary complaints on such code, the <code>syscall</code> package is no longer marked as deprecated.
+      The package remains frozen to most new functionality, and new code remains encouraged to use <a href="/pkg/golang.org/x/sys/unix"><code>golang.org/x/sys/unix</code></a> or <a href="/pkg/golang.org/x/sys/windows"><code>golang.org/x/sys/windows</code></a> where possible.
     </p>
 
     <p><!-- CL 520266 -->
-      TODO: <a href="https://go.dev/cl/520266">https://go.dev/cl/520266</a>: syscall: add support to get pidfd from ForkExec on Linux
+      On Linux, the new <a href="/pkg/syscall#SysProcAttr"><code>SysProcAttr.PidFD</code></a> field allows obtaining a PID FD when starting a child process via <a href="/pkg/syscall#StartProcess"><code>StartProcess</code></a> or <a href="/pkg/os/exec"><code>os/exec</code></a>.
     </p>
 
     <p><!-- CL 541015 -->
-      TODO: <a href="https://go.dev/cl/541015">https://go.dev/cl/541015</a>: syscall: support O_SYNC flag for os.OpenFile on windows
+      On Windows, passing <a href="/pkg/syscall#O_SYNC"><code>O_SYNC</code></a> to <a href="/pkg/syscall#Open"><code>Open</code></a> now causes write operations to go directly to disk, equivalent to <code>O_SYNC</code> on Unix platforms.
     </p>
   </dd>
 </dl><!-- syscall -->