tools/libxl: Initialise the fd of the unused half of a datacopier

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>
This commit is contained in:
Andrew Cooper authored and Ian Campbell committed 2015-07-17 18:10:00 +01:00
1 parent 2909ad4c96
commit 21d9b079e5
2 files changed
+2

No files matched your search

+1
View File
@@ -609,6 +609,7 @@ static void write_emulator_blob(libxl__egc *egc,
dc->ao = stream->ao;
dc->writewhat = "qemu save file";
dc->writefd = writefd;
dc->readfd = -1;
dc->maxsz = -1;
dc->callback = write_emulator_done;
+1
View File
@@ -387,6 +387,7 @@ static void write_emulator_record(libxl__egc *egc,
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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.