From: David Goulet Date: Thu, 16 Feb 2012 22:29:37 +0000 (-0500) Subject: Fix lttcomm_close_unix_sock to actually close the socket X-Git-Tag: v2.0.0-rc1~3 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=b0ef677e04ce0b544e883831c8b0050710c1b651 Fix lttcomm_close_unix_sock to actually close the socket 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 Signed-off-by: David Goulet --- diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index 2b5c226c1..0c29003a6 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -308,6 +308,8 @@ int lttcomm_close_unix_sock(int sock) perror("shutdown"); } + close(sock); + return ret; }