[libvirt] [PATCH] qemu: Don't try to set input FD to -1

--- src/qemu/qemu_driver.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 54e9dcb..1b86b5e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4091,7 +4091,10 @@ static int qemudStartVMDaemon(virConnectPtr conn, VIR_WARN("Executing %s", vm->def->emulator); virCommandSetPreExecHook(cmd, qemudSecurityHook, &hookData); - virCommandSetInputFD(cmd, stdin_fd); + + if (stdin_fd != -1) + virCommandSetInputFD(cmd, stdin_fd); + virCommandSetOutputFD(cmd, &logfile); virCommandSetErrorFD(cmd, &logfile); virCommandNonblockingFDs(cmd); -- 1.7.0.4

On 12/04/2010 04:47 PM, Matthias Bolte wrote:
--- src/qemu/qemu_driver.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 54e9dcb..1b86b5e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4091,7 +4091,10 @@ static int qemudStartVMDaemon(virConnectPtr conn,
VIR_WARN("Executing %s", vm->def->emulator); virCommandSetPreExecHook(cmd, qemudSecurityHook, &hookData); - virCommandSetInputFD(cmd, stdin_fd); + + if (stdin_fd != -1) + virCommandSetInputFD(cmd, stdin_fd); +
ACK -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2010/12/5 Eric Blake <eblake@redhat.com>:
On 12/04/2010 04:47 PM, Matthias Bolte wrote:
--- src/qemu/qemu_driver.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 54e9dcb..1b86b5e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4091,7 +4091,10 @@ static int qemudStartVMDaemon(virConnectPtr conn,
VIR_WARN("Executing %s", vm->def->emulator); virCommandSetPreExecHook(cmd, qemudSecurityHook, &hookData); - virCommandSetInputFD(cmd, stdin_fd); + + if (stdin_fd != -1) + virCommandSetInputFD(cmd, stdin_fd); +
ACK
Thanks, pushed. Matthias
participants (2)
-
Eric Blake
-
Matthias Bolte