Merge pull request #2487 from thaJeztah/fix_compilation_issues_on_go1.11
Fix compilation failures on Go 1.11
This commit is contained in:
commit
88ec4559b6
@ -121,7 +121,7 @@ func (p *process) HcsPid() uint32 {
|
|||||||
|
|
||||||
func (p *process) ExitCode() (uint32, time.Time, error) {
|
func (p *process) ExitCode() (uint32, time.Time, error) {
|
||||||
if s := p.Status(); s != runtime.StoppedStatus && s != runtime.CreatedStatus {
|
if s := p.Status(); s != runtime.StoppedStatus && s != runtime.CreatedStatus {
|
||||||
return 255, time.Time{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "process is not stopped: %s", s)
|
return 255, time.Time{}, errors.Wrapf(errdefs.ErrFailedPrecondition, "process is not stopped: %d", s)
|
||||||
}
|
}
|
||||||
return p.exitCode, p.exitTime, nil
|
return p.exitCode, p.exitTime, nil
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ func (t *task) Update(ctx context.Context, resources *types.Any) error {
|
|||||||
func (t *task) Process(ctx context.Context, id string) (p runtime.Process, err error) {
|
func (t *task) Process(ctx context.Context, id string) (p runtime.Process, err error) {
|
||||||
p = t.getProcess(id)
|
p = t.getProcess(id)
|
||||||
if p == nil {
|
if p == nil {
|
||||||
err = errors.Wrapf(errdefs.ErrNotFound, "no such process %d", id)
|
err = errors.Wrapf(errdefs.ErrNotFound, "no such process %s", id)
|
||||||
}
|
}
|
||||||
|
|
||||||
return p, err
|
return p, err
|
||||||
@ -297,7 +297,7 @@ func (t *task) Stats(ctx context.Context) (*types.Any, error) {
|
|||||||
func (t *task) Wait(ctx context.Context) (*runtime.Exit, error) {
|
func (t *task) Wait(ctx context.Context) (*runtime.Exit, error) {
|
||||||
p := t.getProcess(t.id)
|
p := t.getProcess(t.id)
|
||||||
if p == nil {
|
if p == nil {
|
||||||
return nil, errors.Wrapf(errdefs.ErrNotFound, "no such process %d", t.id)
|
return nil, errors.Wrapf(errdefs.ErrNotFound, "no such process %s", t.id)
|
||||||
}
|
}
|
||||||
return p.Wait(ctx)
|
return p.Wait(ctx)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user