github.imxd.top/hashicorp/consul@v1.4.5/agent/proxyprocess/process.go (about) 1 package proxyprocess 2 3 import ( 4 "strings" 5 ) 6 7 // isProcessAlreadyFinishedErr does a janky comparison with an error string 8 // defined in os/exec_unix.go and os/exec_windows.go which we encounter due to 9 // races with polling the external process. These case tests to fail since Stop 10 // returns an error sometimes so we should notice if this string stops matching 11 // the error in a future go version. 12 func isProcessAlreadyFinishedErr(err error) bool { 13 return strings.Contains(err.Error(), "os: process already finished") 14 }