mirror of https://github.com/containers/podman.git
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>
This commit is contained in:
parent
e2d7e325f4
commit
01ae700a17
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue