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// +build !plan9,!windows 6 7package exec 8 9import ( 10 "os" 11 "syscall" 12) 13 14func init() { 15 skipStdinCopyError = func(err error) bool { 16 // Ignore EPIPE errors copying to stdin if the program 17 // completed successfully otherwise. 18 // See Issue 9173. 19 pe, ok := err.(*os.PathError) 20 return ok && 21 pe.Op == "write" && pe.Path == "|1" && 22 pe.Err == syscall.EPIPE 23 } 24} 25