From 09a0f40278b5c240ed21b0aab7266843c22944ec Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 6 Jan 2016 15:31:08 -0800 Subject: [PATCH] Use basic executor --- client/driver/qemu.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/driver/qemu.go b/client/driver/qemu.go index b3b1e98bd727..377d38e3e3ce 100644 --- a/client/driver/qemu.go +++ b/client/driver/qemu.go @@ -184,7 +184,8 @@ func (d *QemuDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, } // Setup the command - cmd := executor.Command(args[0], args[1:]...) + cmd := executor.NewBasicExecutor() + executor.SetCommand(cmd, args[0], args[1:]) if err := cmd.Limit(task.Resources); err != nil { return nil, fmt.Errorf("failed to constrain resources: %s", err) } @@ -224,8 +225,8 @@ func (d *QemuDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, erro } // Find the process - cmd, err := executor.OpenId(id.ExecutorId) - if err != nil { + cmd := executor.NewBasicExecutor() + if err := cmd.Open(id.ExecutorId); err != nil { return nil, fmt.Errorf("failed to open ID %v: %v", id.ExecutorId, err) }