Skip to content

Commit f6685a5

Browse files
prattmicezz-no
authored andcommitted
doc/go1.22: document syscall changes
For golang#61422. Change-Id: I976b8cc14893b91e5140c7b53d0773bca57cb19d Reviewed-on: https://go-review.googlesource.com/c/go/+/548936 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Michael Pratt <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 3d689ed commit f6685a5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

doc/go1.22.html

+10-3
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,10 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
655655
<code>IO_REPARSE_TAG_MOUNT_POINT</code> reparse points.
656656
</p>
657657

658+
<p><!-- CL 541015 -->
659+
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.
660+
</p>
661+
658662
<p><!-- https://go.dev/issue/58808 -->
659663
TODO: <a href="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
660664
</p>
@@ -809,15 +813,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
809813
<dl id="syscall"><dt><a href="/pkg/syscall/">syscall</a></dt>
810814
<dd>
811815
<p><!-- https://go.dev/issue/60797 -->
812-
TODO: <a href="https://go.dev/issue/60797">https://go.dev/issue/60797</a>: undeprecate
816+
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.
817+
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.
818+
To avoid unnecesary complaints on such code, the <code>syscall</code> package is no longer marked as deprecated.
819+
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.
813820
</p>
814821

815822
<p><!-- CL 520266 -->
816-
TODO: <a href="https://go.dev/cl/520266">https://go.dev/cl/520266</a>: syscall: add support to get pidfd from ForkExec on Linux
823+
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>.
817824
</p>
818825

819826
<p><!-- CL 541015 -->
820-
TODO: <a href="https://go.dev/cl/541015">https://go.dev/cl/541015</a>: syscall: support O_SYNC flag for os.OpenFile on windows
827+
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.
821828
</p>
822829
</dd>
823830
</dl><!-- syscall -->

0 commit comments

Comments
 (0)