From ef5c02c6ee72eb8e127115923951777a2c2b8480 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 26 Jun 2012 11:47:26 +0100 Subject: launch: Log errors from close syscall. --- src/launch.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/launch.c') 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) { -- cgit