From ccf2d0847b36f5f172cdb4afbc64b2228ba20cd6 Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 5 Dec 2010 00:45:43 +0100 Subject: [PATCH] qemu: Don't try to set input FD to -1 --- src/qemu/qemu_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 54e9dcb828..1b86b5e18e 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); -- GitLab