aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec/exec.go')
-rw-r--r--src/os/exec/exec.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index a3a0f20ebc..c4c5168b98 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -579,6 +579,13 @@ func (c *closeOnce) Write(b []byte) (int, error) {
return n, err
}
+func (c *closeOnce) WriteString(s string) (int, error) {
+ c.writers.RLock()
+ n, err := c.File.WriteString(s)
+ c.writers.RUnlock()
+ return n, err
+}
+
// StdoutPipe returns a pipe that will be connected to the command's
// standard output when the command starts.
//