commit | 24e798e2876f05d628f1e9a32ce8c7f4a3ed3268 | [log] [tgz] |
---|---|---|
author | Tobias Klauser <tklauser@distanz.ch> | Wed Oct 13 16:30:16 2021 +0200 |
committer | Tobias Klauser <tobias.klauser@gmail.com> | Thu Oct 14 13:09:28 2021 +0000 |
tree | e0653dcad39586e3a708ee258168c41bd6f14c77 | |
parent | 2feb2cc450e1925b9359957c90bae27e01662171 [diff] |
syscall: use fcntl with F_DUP2FD_CLOEXEC in forkAndExecInChild on FreeBSD Use fcntl(oldfd, F_DUP2FD_CLOEXEC, newfd) to duplicate the file descriptor and mark is as close-on-exec instead of dup2 & fcntl. FreeBSD implements dup3 like this in libc. Change-Id: I36e37bc61c2e31561adb49001f287764125a74de Reviewed-on: https://go-review.googlesource.com/c/go/+/355571 Trust: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://golang.org/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.