protocol: Abstract out socket operations from protocol code.

This creates an abstract layer below the protocol code which handles
the socket operations.  This will make it easier to introduce libvirt
virSocketPtr operations in future.

In the handle, g->conn contains the connection to the appliance.
g->conn is NULL when we're not connected.

poll(2) is used instead of select(2).

All error messages about launch failing or the appliance unexpectedly
dying are handled by two common error message functions, and these
contain a better explanation of what to do.
This commit is contained in:
Richard W.M. Jones
2013-03-07 14:55:40 +00:00
parent 06b39b8098
commit ed41fcd75c
12 changed files with 883 additions and 690 deletions

View File

@@ -142,6 +142,9 @@ L<https://bugzilla.redhat.com/show_bug.cgi?id=806106>.
=head2 "child process died unexpectedly"
[This error message was changed in libguestfs 1.21.18 to something
more explanatory.]
This error indicates that qemu failed or the host kernel could not boot.
To get further information about the failure, you have to run: