summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-04-26 12:43:48 +0200
committerValentin Rothberg <rothberg@redhat.com>2019-04-26 12:47:02 +0200
commit01ae700a171fb371af48fff1dcda74c2743bd627 (patch)
tree106ee3b97072cf18f4e7b30ffb0826cba7212eb1
parente2d7e325f42b58290275b6bc25f1b0c64378aff4 (diff)
downloadpodman-01ae700a171fb371af48fff1dcda74c2743bd627.tar.gz
podman-01ae700a171fb371af48fff1dcda74c2743bd627.tar.bz2
podman-01ae700a171fb371af48fff1dcda74c2743bd627.zip
update psgo to v1.2.1
* move to go modules * fix ErrUnkownDescriptor typo * catch errors of Setns() Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
-rw-r--r--vendor.conf2
-rw-r--r--vendor/github.com/containers/psgo/psgo.go11
2 files changed, 8 insertions, 5 deletions
diff --git a/vendor.conf b/vendor.conf
index 3abb01114..572ae5fdb 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -20,7 +20,7 @@ github.com/vbauerster/mpb v3.3.4
github.com/mattn/go-isatty v0.0.4
github.com/VividCortex/ewma v1.1.1
github.com/containers/storage v1.12.3
-github.com/containers/psgo v1.2
+github.com/containers/psgo v1.2.1
github.com/coreos/go-systemd v14
github.com/coreos/pkg v4
github.com/cri-o/ocicni 0c180f981b27ef6036fa5be29bcb4dd666e406eb
diff --git a/vendor/github.com/containers/psgo/psgo.go b/vendor/github.com/containers/psgo/psgo.go
index e0f102735..f1936f917 100644
--- a/vendor/github.com/containers/psgo/psgo.go
+++ b/vendor/github.com/containers/psgo/psgo.go
@@ -93,7 +93,7 @@ func translateDescriptors(descriptors []string) ([]aixFormatDescriptor, error) {
}
}
if !found {
- return nil, errors.Wrapf(ErrUnkownDescriptor, "'%s'", d)
+ return nil, errors.Wrapf(ErrUnknownDescriptor, "'%s'", d)
}
}
@@ -104,8 +104,8 @@ var (
// DefaultDescriptors is the `ps -ef` compatible default format.
DefaultDescriptors = []string{"user", "pid", "ppid", "pcpu", "etime", "tty", "time", "args"}
- // ErrUnkownDescriptor is returned when an unknown descriptor is parsed.
- ErrUnkownDescriptor = errors.New("unknown descriptor")
+ // ErrUnknownDescriptor is returned when an unknown descriptor is parsed.
+ ErrUnknownDescriptor = errors.New("unknown descriptor")
aixFormatDescriptors = []aixFormatDescriptor{
{
@@ -327,7 +327,10 @@ func JoinNamespaceAndProcessInfo(pid string, descriptors []string) ([][]string,
dataErr = err
return
}
- unix.Setns(int(fd.Fd()), unix.CLONE_NEWNS)
+ if err := unix.Setns(int(fd.Fd()), unix.CLONE_NEWNS); err != nil {
+ dataErr = err
+ return
+ }
// extract all pids mentioned in pid's mount namespace
pids, err := proc.GetPIDs()