Compile driver interface changes

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-01-20 18:27:36 -08:00 committed by Guillaume J. Charmes
parent 75e0357d69
commit ba8ca59862
3 changed files with 6 additions and 6 deletions

View File

@ -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")
} }

View File

@ -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

View File

@ -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
} }