This bug causes a spurious failure if stdin happens to be an
appropriately readable/writeable pipe which receives a POLLHUP
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
dc->ao = stream->ao;
dc->writewhat = "qemu save file";
dc->writefd = writefd;
+ dc->readfd = -1;
dc->maxsz = -1;
dc->callback = write_emulator_done;
dc->ao = stream->ao;
dc->readwhat = "qemu save file";
dc->readfd = readfd;
+ dc->writefd = -1;
dc->maxsz = -1;
dc->readbuf = stream->emu_body + sizeof(*ehdr);
dc->bytes_to_read = rec->length - sizeof(*ehdr);