You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, passing <ahref="/pkg/os#O_SYNC"><code>O_SYNC</code></a> to <ahref="/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
+
658
662
<p><!-- https://go.dev/issue/58808 -->
659
663
TODO: <ahref="https://go.dev/issue/58808">https://go.dev/issue/58808</a>: arrange zero-copy of os.File and TCPConn to UnixConn
660
664
</p>
@@ -809,15 +813,18 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
The <code>syscall</code> package has been <ahref="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 <ahref="/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 <ahref="/pkg/golang.org/x/sys/unix"><code>golang.org/x/sys/unix</code></a> or <ahref="/pkg/golang.org/x/sys/windows"><code>golang.org/x/sys/windows</code></a> where possible.
813
820
</p>
814
821
815
822
<p><!-- CL 520266 -->
816
-
TODO: <ahref="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 <ahref="/pkg/syscall#SysProcAttr"><code>SysProcAttr.PidFD</code></a> field allows obtaining a PID FD when starting a child process via <ahref="/pkg/syscall#StartProcess"><code>StartProcess</code></a> or <ahref="/pkg/os/exec"><code>os/exec</code></a>.
817
824
</p>
818
825
819
826
<p><!-- CL 541015 -->
820
-
TODO: <ahref="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 <ahref="/pkg/syscall#O_SYNC"><code>O_SYNC</code></a> to <ahref="/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.
0 commit comments