2018-05-02 18:47:57 +00:00
|
|
|
// +build darwin linux windows
|
|
|
|
|
2018-09-06 10:50:38 +00:00
|
|
|
package proxyprocess
|
2018-05-02 18:47:57 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
// exitStatus for platforms with syscall.WaitStatus which are listed
|
|
|
|
// at the top of this file in the build constraints.
|
|
|
|
func exitStatus(ps *os.ProcessState) (int, bool) {
|
|
|
|
if status, ok := ps.Sys().(syscall.WaitStatus); ok {
|
|
|
|
return status.ExitStatus(), true
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0, false
|
|
|
|
}
|