[systemd-devel] Why systemd keeps references on passed sockets ?

Francis Moreau francis.moro at gmail.com
Fri Sep 4 19:53:01 UTC 2020


Hi,

I have a service which is activated by a socket unit. When systemd
passes the (netlink) socket to my service it seems that it still keeps
a reference on the socket, at least ss(8) showed this.

Is this expected ? If yes can this be prevented ?

I'm asking because my service may not need the socket in some cases
hence it closes it but systemd keeps it open and the socket keeps
receiving messages and consuming memory for nothing.

Thank you.
-- 
Francis


More information about the systemd-devel mailing list