]> Cypherpunks repositories - gostls13.git/commit
os/exec: do not close pipes on a double-Start error
authorBryan C. Mills <bcmills@google.com>
Wed, 28 Sep 2022 17:29:12 +0000 (13:29 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 29 Sep 2022 02:28:26 +0000 (02:28 +0000)
commit4d6ca68a85e42c75683bc96aa540207566f54e26
tree603cece2f0ab25bbfdd5e690ecf5947dbd41b985
parent13d48bb6a1ad3787c10fbbe4265ad11672d90a37
os/exec: do not close pipes on a double-Start error

This fixes a bug introduced in CL 401834 in which calling Start twice
with pipes attached to a command would spuriously close those pipes
when returning the error from the second Start call.

For #50436.

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