expose exec-id on ctr task ps

Signed-off-by: Jess Valarezo <valarezo.jessica@gmail.com>
This commit is contained in:
Jess Valarezo
2017-11-03 14:49:47 -07:00
parent b4a65de5c6
commit 807f4d2ec7
12 changed files with 319 additions and 102 deletions

View File

@@ -99,6 +99,10 @@ func (p *process) Pid() uint32 {
return p.pid
}
func (p *process) HcsPid() uint32 {
return uint32(p.hcs.Pid())
}
func (p *process) ExitCode() (uint32, time.Time, error) {
if s := p.Status(); s != runtime.StoppedStatus && s != runtime.CreatedStatus {
return 255, time.Time{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "process is not stopped: %s", s)