+/*
+ * ustcomm_shutdown_unix_sock
+ *
+ * Shutdown unix socket. Keeps the file descriptor open, but shutdown
+ * communication.
+ */
+int ustcomm_shutdown_unix_sock(int sock)
+{
+ int ret;
+
+ ret = shutdown(sock, SHUT_RDWR);
+ if (ret) {
+ PERROR("Socket shutdown error");
+ ret = -errno;
+ }
+ return ret;
+}
+