Merge pull request #6452 from zvier/main

This commit is contained in:
Fu Wei 2022-02-17 10:50:48 +08:00 committed by GitHub
commit 3122239ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,8 +270,13 @@ func (manager) Stop(ctx context.Context, id string) (shim.StopStatus, error) {
if err := mount.UnmountAll(filepath.Join(path, "rootfs"), 0); err != nil { if err := mount.UnmountAll(filepath.Join(path, "rootfs"), 0); err != nil {
log.G(ctx).WithError(err).Warn("failed to cleanup rootfs mount") log.G(ctx).WithError(err).Warn("failed to cleanup rootfs mount")
} }
pid, err := runcC.ReadPidFile(filepath.Join(path, process.InitPidFile))
if err != nil {
log.G(ctx).WithError(err).Warn("failed to read init pid file")
}
return shim.StopStatus{ return shim.StopStatus{
ExitedAt: time.Now(), ExitedAt: time.Now(),
ExitStatus: 128 + int(unix.SIGKILL), ExitStatus: 128 + int(unix.SIGKILL),
Pid: pid,
}, nil }, nil
} }