1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #2164 from pnasrat/add-finished-time

* Runtime: Record termination time in state.
This commit is contained in:
Guillaume J. Charmes 2013-10-10 16:29:07 -07:00
commit f9b9dfc82d

View file

@ -13,6 +13,7 @@ type State struct {
Pid int
ExitCode int
StartedAt time.Time
FinishedAt time.Time
Ghost bool
}
@ -38,5 +39,6 @@ func (s *State) setRunning(pid int) {
func (s *State) setStopped(exitCode int) {
s.Running = false
s.Pid = 0
s.FinishedAt = time.Now()
s.ExitCode = exitCode
}