qemu: Don't try to set input FD to -1

This commit is contained in:
Matthias Bolte 2010-12-05 00:45:43 +01:00
parent 45ef4d5e8a
commit ccf2d0847b

View File

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