mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Unix sockets: remove on closing only the file this socket bound
When a reload cannot take a listening Unix socket over (a bind-time -ol option changed), the new service binds the path anew, and the old listener, closing after it, removed the file, the new socket's by then, leaving nothing to connect to. The socket's file (device and inode) is now noted on binding and the path removed on closing only if it is still that file. structures.h includes <stddef.h> for offsetof() in SASIZE(), which needs it wherever the header is used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9612bbdd22
commit
5c19e6368f
3 files changed
+45
-2
No files matched your search
@@ -113,6 +113,7 @@ int
|
||||
|
||||
#ifdef WITH_UN
|
||||
#include <sys/un.h>
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#define ALLOW 0
|
||||
@@ -631,6 +632,8 @@ struct srvparam {
|
||||
AUTHFUNC authfunc;
|
||||
PROXYFUNC pf;
|
||||
SOCKET srvsock, cbsock;
|
||||
/* the file of a Unix socket bound to a path, to remove only it */
|
||||
uint64_t undev, unino;
|
||||
int childcount;
|
||||
int maxchild;
|
||||
int backlog;
|
||||
|
||||
Reference in new issue
Block a user