diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-06-26 11:47:26 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-06-26 11:50:12 +0100 |
commit | ef5c02c6ee72eb8e127115923951777a2c2b8480 (patch) | |
tree | d1c06f735c323c8eb9f43d8a238a7949315f74dc /src/launch.c | |
parent | 90d0beb3c528d91029349b64d0159836c776189b (diff) | |
download | libguestfs-ef5c02c6ee72eb8e127115923951777a2c2b8480.tar.gz libguestfs-ef5c02c6ee72eb8e127115923951777a2c2b8480.tar.xz libguestfs-ef5c02c6ee72eb8e127115923951777a2c2b8480.zip |
launch: Log errors from close syscall.
Diffstat (limited to 'src/launch.c')
-rw-r--r-- | src/launch.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/launch.c b/src/launch.c index cd785014..493455fb 100644 --- a/src/launch.c +++ b/src/launch.c @@ -1048,7 +1048,12 @@ launch_appliance (guestfs_h *g) * able to open a drive. */ - close (g->sock); /* Close the listening socket. */ + /* Close the listening socket. */ + if (close (g->sock) != 0) { + perrorf (g, "close: listening socket"); + close (r); + goto cleanup1; + } g->sock = r; /* This is the accepted data socket. */ if (fcntl (g->sock, F_SETFL, O_NONBLOCK) == -1) { |