[ LTTCOMM_ERR_INDEX(LTTCOMM_NO_SESSION) ] = "No session found",
[ LTTCOMM_ERR_INDEX(LTTCOMM_LIST_FAIL) ] = "Unable to list traceable apps",
[ LTTCOMM_ERR_INDEX(LTTCOMM_NO_APPS) ] = "No traceable apps found",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_NO_SESS) ] = "No session found",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_FATAL) ] = "Fatal error of the session daemon",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_CREATE_FAIL) ] = "Create trace failed",
};
/*
return ret;
}
+
+/*
+ * lttcomm_close_unix_sock
+ *
+ * Shutdown cleanly a unix socket.
+ */
+int lttcomm_close_unix_sock(int sock)
+{
+ int ret;
+
+ /* Shutdown receptions and transmissions */
+ ret = shutdown(sock, SHUT_RDWR);
+ if (ret < 0) {
+ perror("shutdown");
+ }
+
+ return ret;
+}