Add basic fifo support for IO copy
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -15,6 +15,8 @@ type StartTask struct {
|
||||
Container runtime.Container
|
||||
Checkpoint string
|
||||
IO *runtime.IO
|
||||
Stdout string
|
||||
Stderr string
|
||||
Err chan error
|
||||
}
|
||||
|
||||
@@ -34,8 +36,7 @@ func (w *worker) Start() {
|
||||
defer w.wg.Done()
|
||||
for t := range w.s.tasks {
|
||||
started := time.Now()
|
||||
// start logging the container's stdio
|
||||
l, err := w.s.log(t.Container.Path(), t.IO)
|
||||
l, err := w.s.copyIO(t.Stdout, t.Stderr, t.IO)
|
||||
if err != nil {
|
||||
evt := NewEvent(DeleteEventType)
|
||||
evt.ID = t.Container.ID()
|
||||
@@ -43,7 +44,7 @@ func (w *worker) Start() {
|
||||
t.Err <- err
|
||||
continue
|
||||
}
|
||||
w.s.containers[t.Container.ID()].logger = l
|
||||
w.s.containers[t.Container.ID()].copier = l
|
||||
if t.Checkpoint != "" {
|
||||
if err := t.Container.Restore(t.Checkpoint); err != nil {
|
||||
evt := NewEvent(DeleteEventType)
|
||||
|
Reference in New Issue
Block a user