diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-07-06 15:04:35 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-07-06 15:04:35 +0200 |
| commit | 4e3820bfb2ea2331d420033ae77d341ed049c2a5 (patch) | |
| tree | c1795cb8a5c620b3893856047f074ad27be21b53 /pkg/osutil/osutil_noappengine.go | |
| parent | ac5a135b3091f46371a8419547956684e847beb4 (diff) | |
pkg/osutil: don't use os.ProcessState.ExitCode on appengine
It's not present in Go 1.11.
Diffstat (limited to 'pkg/osutil/osutil_noappengine.go')
| -rw-r--r-- | pkg/osutil/osutil_noappengine.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/osutil/osutil_noappengine.go b/pkg/osutil/osutil_noappengine.go new file mode 100644 index 000000000..4c822db5b --- /dev/null +++ b/pkg/osutil/osutil_noappengine.go @@ -0,0 +1,17 @@ +// Copyright 2020 syzkaller project authors. All rights reserved. +// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +// +build !appengine + +package osutil + +import ( + "os/exec" +) + +func exitCode(err error) int { + if exitError, ok := err.(*exec.ExitError); ok { + return exitError.ProcessState.ExitCode() + } + return 0 +} |
