Fix lttcomm_close_unix_sock to actually close the socket
authorDavid Goulet <dgoulet@efficios.com>
Thu, 16 Feb 2012 22:29:37 +0000 (17:29 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 16 Feb 2012 22:36:00 +0000 (17:36 -0500)
To all soul out there, shutdown(sock, SHUT_RDWR) does NOT close the
socket keeping it open after the call. I have to say for my defense that
the man page does not specify it clearly :P.

Reported-by: Irina Guilman <irina.guilman@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/sessiond-comm/sessiond-comm.c

index 2b5c226c1c421ea5576dfdc6b6b96a8fb3c9824d..0c29003a6267a382b204a6f277a9d0a1468ad182 100644 (file)
@@ -308,6 +308,8 @@ int lttcomm_close_unix_sock(int sock)
                perror("shutdown");
        }
 
+       close(sock);
+
        return ret;
 }
 
This page took 0.026283 seconds and 4 git commands to generate.