]> Cypherpunks repositories - gostls13.git/commit
Revert "os/exec: make StdoutPipe and StderrPipe safe to Close concurrently"
authorBryan Mills <bcmills@google.com>
Tue, 4 Oct 2022 19:55:56 +0000 (19:55 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 4 Oct 2022 21:17:23 +0000 (21:17 +0000)
commit3380ee2520165187c3d1476c46d16bc76376d4d4
treea9a12b8168852dfbc397ddbf0a0ae8b9ae36680a
parent058f019e45fc1f18842e0339d7d56d804936263b
Revert "os/exec: make StdoutPipe and StderrPipe safe to Close concurrently"

This reverts CL 437176.

Reason for revert: broke programs that plumb StdoutPipe from one command to Stdin on another and then call Wait on the former.

os/exec itself uses a type-assertion to *os.File to determine whether to copy stdin using a goroutine or just pass a file descriptor. An early Wait using a *os.File is benign (because closing the pipe doesn't close the child's inherited file descriptor), but an early Wait using a non-*os.File is not.

Updates #50436.

Change-Id: I4a2993e290982834f91696d890dfe77364c0cc50
Reviewed-on: https://go-review.googlesource.com/c/go/+/438695
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/os/exec/exec.go