Skip to content

Commit

Permalink
Merge pull request moby#2164 from pnasrat/add-finished-time
Browse files Browse the repository at this point in the history
* Runtime: Record termination time in state.
  • Loading branch information
creack committed Oct 10, 2013
2 parents c978f0f + 2eb404a commit f9b9dfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions state.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type State struct {
Pid int
ExitCode int
StartedAt time.Time
FinishedAt time.Time
Ghost bool
}

Expand All @@ -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
}

0 comments on commit f9b9dfc

Please sign in to comment.