Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscall: use fcntl with F_DUP2FD_CLOEXEC in forkAndExecInChild on Fre…
…eBSD 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 <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information