mirror of https://github.com/docker/docs.git
Compile driver interface changes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
75e0357d69
commit
ba8ca59862
|
@ -74,7 +74,7 @@ func (d *driver) Kill(p *execdriver.Command, sig int) error {
|
||||||
return p.Process.Kill()
|
return p.Process.Kill()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *driver) Wait(id string) error {
|
func (d *driver) Restore(c *execdriver.Command) error {
|
||||||
panic("Not Implemented")
|
panic("Not Implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,9 @@ type Info interface {
|
||||||
type Driver interface {
|
type Driver interface {
|
||||||
Run(c *Command, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
|
Run(c *Command, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
|
||||||
Kill(c *Command, sig int) error
|
Kill(c *Command, sig int) error
|
||||||
Restore(id string) (*Command, error) // Wait and try to re-attach on an out of process...process (lxc ghosts)
|
Restore(c *Command) error // Wait and try to re-attach on an out of process command
|
||||||
Name() string // Driver name
|
Name() string // Driver name
|
||||||
Info(id string) Info // "temporary" hack (until we move state from core to plugins)
|
Info(id string) Info // "temporary" hack (until we move state from core to plugins)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Network settings of the container
|
// Network settings of the container
|
||||||
|
|
|
@ -176,9 +176,9 @@ func (d *driver) Kill(c *execdriver.Command, sig int) error {
|
||||||
return d.kill(c, sig)
|
return d.kill(c, sig)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *driver) Wait(id string) error {
|
func (d *driver) Restore(c *execdriver.Command) error {
|
||||||
for {
|
for {
|
||||||
output, err := exec.Command("lxc-info", "-n", id).CombinedOutput()
|
output, err := exec.Command("lxc-info", "-n", c.ID).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue