mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
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:
+5
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user