From 05476c4d04a24bdb26fa64e05ab31bc36118f34e Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sun, 18 May 2014 11:42:26 +0200 Subject: IPv4/IPv6 integrated socket code. --- sysdep/unix/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sysdep/unix/main.c') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 31094c52..61b306dc 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -463,7 +463,12 @@ cli_init_unix(uid_t use_uid, gid_t use_gid) s->type = SK_UNIX_PASSIVE; s->rx_hook = cli_connect; s->rbsize = 1024; - sk_open_unix(s, path_control_socket); + + /* Return value intentionally ignored */ + unlink(path_control_socket); + + if (sk_open_unix(s, path_control_socket) < 0) + die("Cannot create control socket %s: %m", path_control_socket); if (use_uid || use_gid) if (chown(path_control_socket, use_uid, use_gid) < 0) -- cgit v1.2.3