From: Carsten Haitzler (Rasterman) Date: Sat, 15 Feb 2020 11:31:43 +0000 (+0000) Subject: ecore_con - on bsd if we get flock unlink old socket by force X-Git-Tag: submit/tizen/20200217.221032~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8d16b6e9b1009485d4773b88083e8846f274071;p=platform%2Fupstream%2Fefl.git ecore_con - on bsd if we get flock unlink old socket by force trying to address other parts of the bsd socket hanging on bind() etc. ... unlink socket if we get the file lock as we should now have an exclusive lock on the socket anyway - clear out the old one by force once we have the lock. --- diff --git a/src/lib/ecore_con/efl_net_server_unix.c b/src/lib/ecore_con/efl_net_server_unix.c index a94c880e1d..776f6a2f20 100644 --- a/src/lib/ecore_con/efl_net_server_unix.c +++ b/src/lib/ecore_con/efl_net_server_unix.c @@ -206,6 +206,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd) err = EADDRINUSE; goto error; } + unlink(addr.sun_path); pd->have_lock_fd = EINA_TRUE; #endif r = bind(fd, (struct sockaddr *)&addr, addrlen);