core/service: serialize and deserialize accept_socket
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 5 Aug 2016 03:26:31 +0000 (23:26 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 5 Aug 2016 12:16:31 +0000 (08:16 -0400)
commit9dfb64f87da718284f5c840ac6176dccbfd7dc3e
treee7792edceb35552609e112f16d38369f3031e639
parent166cf510c2ba5aed15dcb807ec263ea2201dcb28
core/service: serialize and deserialize accept_socket

This fixes an issue during reexec — the count of connections would be lost:

[zbyszek@fedora-rawhide ~]$ systemctl status testlimit.socket | grep Connected
 Accepted: 1; Connected: 1

[zbyszek@fedora-rawhide ~]$ sudo systemctl daemon-reexec
[zbyszek@fedora-rawhide ~]$ systemctl status testlimit.socket | grep Connected
 Accepted: 1; Connected: 0

With the patch, Connected count is preserved.

Also add "Accept Socket" to the dump output for services.
src/core/service.c