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-28 09:37:38 +0100 |
commit | 79fd59f171cb761425d8171b536a0e752d2d9738 (patch) | |
tree | a73efae41841fa60f8b4775060b253a7323749c8 | |
parent | 443b56764930cb838befe83eeb76c2763d02ddcc (diff) | |
download | libguestfs-79fd59f171cb761425d8171b536a0e752d2d9738.tar.gz libguestfs-79fd59f171cb761425d8171b536a0e752d2d9738.tar.xz libguestfs-79fd59f171cb761425d8171b536a0e752d2d9738.zip |
launch: Log errors from close syscall.
(cherry picked from commit ef5c02c6ee72eb8e127115923951777a2c2b8480)
-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 3b1f91c3..acaeebf5 100644 --- a/src/launch.c +++ b/src/launch.c @@ -1015,7 +1015,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) { |