Add exited at to events and delete requests

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-04-13 13:55:58 -07:00
parent d41f146eed
commit efe177ed77
14 changed files with 351 additions and 189 deletions

View File

@@ -11,6 +11,7 @@ import (
"path/filepath"
"sync"
"syscall"
"time"
"golang.org/x/sys/unix"
@@ -28,6 +29,7 @@ type execProcess struct {
console console.Console
io runc.IO
status int
exited time.Time
pid int
closers []io.Closer
stdin io.Closer
@@ -125,8 +127,13 @@ func (e *execProcess) Status() int {
return e.status
}
func (e *execProcess) ExitedAt() time.Time {
return e.exited
}
func (e *execProcess) Exited(status int) {
e.status = status
e.exited = time.Now()
e.Wait()
if e.io != nil {
for _, c := range e.closers {