Return fifo paths from Shim

This allows attach of existing fifos to be done without any information
stored on the client side.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-01 13:36:44 -07:00
parent 43fb19e01c
commit 00734ab04a
16 changed files with 682 additions and 191 deletions

View File

@@ -30,7 +30,8 @@ type initProcess struct {
// the right order when invoked in separate go routines.
// This is the case within the shim implementation as it makes use of
// the reaper interface.
mu sync.Mutex
mu sync.Mutex
id string
bundle string
console console.Console
@@ -41,6 +42,11 @@ type initProcess struct {
pid int
closers []io.Closer
stdin io.Closer
stdinPath string
stdoutPath string
stderrPath string
terminal bool
}
func newInitProcess(context context.Context, path string, r *shimapi.CreateRequest) (*initProcess, error) {
@@ -61,9 +67,13 @@ func newInitProcess(context context.Context, path string, r *shimapi.CreateReque
PdeathSignal: syscall.SIGKILL,
}
p := &initProcess{
id: r.ID,
bundle: r.Bundle,
runc: runtime,
id: r.ID,
bundle: r.Bundle,
runc: runtime,
stdinPath: r.Stdin,
stdoutPath: r.Stdout,
stderrPath: r.Stderr,
terminal: r.Terminal,
}
var (
err error