Use fifo for create/start

This removes the use of a signal handler and SIGCONT to signal the init
process to exec the users process.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2016-06-06 13:15:18 -07:00
parent 8fbe19e020
commit 3aacff695d
12 changed files with 124 additions and 75 deletions
+5 -9
View File
@@ -229,7 +229,11 @@ func (r *runner) run(config *specs.Process) (int, error) {
return -1, err
}
handler := newSignalHandler(tty, r.enableSubreaper)
if err := r.container.Start(process); err != nil {
startFn := r.container.Start
if !r.create {
startFn = r.container.Run
}
if err := startFn(process); err != nil {
r.destroy()
tty.Close()
return -1, err
@@ -248,14 +252,6 @@ func (r *runner) run(config *specs.Process) (int, error) {
return -1, err
}
}
if !r.create {
if err := process.Signal(libcontainer.InitContinueSignal); err != nil {
r.terminate(process)
r.destroy()
tty.Close()
return -1, err
}
}
if r.detach || r.create {
tty.Close()
return 0, nil