1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build !plan9 && !windows 6 // +build !plan9,!windows 7 8 package exec 9 10 import ( 11 "io/fs" 12 "syscall" 13 ) 14 15 func init() { 16 skipStdinCopyError = func(err error) bool { 17 // Ignore EPIPE errors copying to stdin if the program 18 // completed successfully otherwise. 19 // See Issue 9173. 20 pe, ok := err.(*fs.PathError) 21 return ok && 22 pe.Op == "write" && pe.Path == "|1" && 23 pe.Err == syscall.EPIPE 24 } 25 } 26