diff --git a/src/main/pgpool_main.c b/src/main/pgpool_main.c index 8bfcfbc..12eff29 100644 --- a/src/main/pgpool_main.c +++ b/src/main/pgpool_main.c @@ -960,6 +960,9 @@ create_unix_domain_socket(struct sockaddr_un un_addr_tmp) int status; int len; + /* Delete any pre-existing socket file to avoid failure at bind() time */ + unlink(un_addr_tmp.sun_path); + fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd == -1) {