From ba22191800d42e5ee408e9edd938c853fd7f0e95 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sat, 11 Jun 2022 02:56:38 +0200 Subject: [PATCH] Fix tio deleting unix socket file If tio has a unix file socket open, a second tio instance of tio may delete the socket file. This change fixes so that it will not be deleted and tio will instead error and complain about conflicting socket file. --- src/socket.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/socket.c b/src/socket.c index d2b125e..b9a9bb9 100644 --- a/src/socket.c +++ b/src/socket.c @@ -77,7 +77,6 @@ void socket_configure(void) exit(EXIT_FAILURE); } - unlink(socket_filename()); if (bind(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { error_printf("Failed to bind to socket %s: %s", socket_filename(), strerror(errno));