]> Cypherpunks.ru repositories - gostls13.git/commit
os: mark pipes returned by os.Pipe() as inheritable by default
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 31 Jan 2021 18:51:45 +0000 (19:51 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 1 Mar 2021 09:17:40 +0000 (09:17 +0000)
commit2a8df4488ee893353b1200794bde758e9726e7c7
tree8e577092035ec0bdbc38d47fee7a3757be7f0600
parent5ff7ec98b7727b3641df25200345b1aa50b6ff35
os: mark pipes returned by os.Pipe() as inheritable by default

Now that we don't automatically pass all inheritable handles to new
processes, we can make pipes returned by os.Pipe() inheritable, just
like they are on Unix. This then allows them to be passed through the
SysProcAttr.AdditionalInheritedHandles parameter simply.

Updates #44011.
Fixes #21085.

Change-Id: I8eae329fbc74f9dc7962136fa9aae8fb66879751
Reviewed-on: https://go-review.googlesource.com/c/go/+/288299
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/os/exec/exec_test.go
src/os/exec/exec_windows_test.go [new file with mode: 0644]
src/os/file_windows.go