chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d451c6c
)
server/admin.c (a_listen): If stat(2) says the socket has gone, then retry.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 13 May 2018 00:56:44 +0000
(
01:56
+0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 25 Jan 2019 12:10:31 +0000
(12:10 +0000)
This saves us from making an embarrassing `stat failed because ENOENT'
report.
server/admin.c
patch
|
blob
|
blame
|
history
diff --git
a/server/admin.c
b/server/admin.c
index acdb973af784bfa0899d444554485c53f7a81720..6ff141876f3976c080a1f55bc72be21d5fb44b7d 100644
(file)
--- a/
server/admin.c
+++ b/
server/admin.c
@@
-2538,6
+2538,7
@@
again:
if (errno != ECONNREFUSED)
die(EXIT_FAILURE, "couldn't bind to address: %s", strerror(e));
if (stat(sun.sun_path, &st)) {
+ if (errno == ENOENT) { close(fd); goto again; }
die(EXIT_FAILURE, "couldn't stat `%s': %s",
sun.sun_path, strerror(errno));
}