mirror of
https://github.com/pygos/usyslog.git
synced 2024-11-17 02:07:11 +01:00
Remove any pre-existing socket before binding
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
a09f0bd8e0
commit
fb498dba96
1 changed files with 2 additions and 0 deletions
2
mksock.c
2
mksock.c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue