diff --git a/libos/include/os/LocalServer.h b/libos/include/os/LocalServer.h index 1adfa92a..ddc38fd1 100644 --- a/libos/include/os/LocalServer.h +++ b/libos/include/os/LocalServer.h @@ -136,6 +136,7 @@ namespace os ~LocalServer(); private: + StringView m_path; int m_fd; bool m_blocking; }; diff --git a/libos/src/LocalServer.cpp b/libos/src/LocalServer.cpp index 94e5d555..89ef2c85 100644 --- a/libos/src/LocalServer.cpp +++ b/libos/src/LocalServer.cpp @@ -43,6 +43,7 @@ namespace os fcntl(sockfd, F_SETFD, FD_CLOEXEC); server->m_fd = sockfd; + server->m_path = path; return server; } @@ -63,6 +64,7 @@ namespace os LocalServer::~LocalServer() { close(m_fd); + os::FileSystem::remove(m_path); } LocalServer::Client::Client(Client&& other) : m_fd(other.m_fd)