1
0
Fork 0
mirror of https://github.com/pygos/usyslog.git synced 2024-05-07 23:16:13 +02:00

Remove any pre-existing socket before binding

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-11-05 21:40:50 +01:00
parent a09f0bd8e0
commit fb498dba96

View file

@ -28,6 +28,8 @@ int mksock(const char *path)
strcpy(un.sun_path, path);
unlink(un.sun_path);
if (bind(fd, (struct sockaddr *)&un, sizeof(un))) {
errmsg ="bind";
goto fail_errno;