]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #3202 from poettering/socket-fixes
authorMartin Pitt <martin.pitt@ubuntu.com>
Sun, 8 May 2016 19:09:35 +0000 (21:09 +0200)
committerMartin Pitt <martin.pitt@ubuntu.com>
Sun, 8 May 2016 19:09:35 +0000 (21:09 +0200)
don't reopen socket fds when reloading the daemon

1  2 
src/basic/socket-util.h
src/core/socket.c

index daa4b24a374718d82e7594cd95212d25577e7c71,9f6a30136888452d90c01b03f1134fec752c2a47..160f7c484baa315daa9636b1b10117a44eea04a3
@@@ -135,16 -135,7 +135,18 @@@ int receive_one_fd(int transport_fd, in
  
  ssize_t next_datagram_size_fd(int fd);
  
+ int flush_accept(int fd);
  #define CMSG_FOREACH(cmsg, mh)                                          \
          for ((cmsg) = CMSG_FIRSTHDR(mh); (cmsg); (cmsg) = CMSG_NXTHDR((mh), (cmsg)))
 +
 +/* Covers only file system and abstract AF_UNIX socket addresses, but not unnamed socket addresses. */
 +#define SOCKADDR_UN_LEN(sa)                                             \
 +        ({                                                              \
 +                const struct sockaddr_un *_sa = &(sa);                  \
 +                assert(_sa->sun_family == AF_UNIX);                     \
 +                offsetof(struct sockaddr_un, sun_path) +                \
 +                        (_sa->sun_path[0] == 0 ?                        \
 +                         1 + strnlen(_sa->sun_path+1, sizeof(_sa->sun_path)-1) : \
 +                         strnlen(_sa->sun_path, sizeof(_sa->sun_path))); \
 +        })
Simple merge