Record termination time in state.

Supercedes pull #1946
Upstream-commit: 2eb404ab14ef4b70e101cbb43c124651553de5d2
Component: engine
This commit is contained in:
Paul Nasrat
2013-10-10 14:47:25 -04:00
parent 10fc3f9886
commit e57f722bf3
+2
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
}