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.
This commit is contained in:
Martin Lund 2022-06-11 02:56:38 +02:00
parent 373dca3d5b
commit ba22191800

View file

@ -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));