dnf-json: Avoid leaking memory on the Cpp side
To avoid dnf leaking memory, dnf-json as a service calls fork() on each request. This allow memory to be freed automatically when the process handling the request is destroyed.
This commit is contained in:
parent
f8281eee54
commit
0877ae3ac0
1 changed files with 1 additions and 1 deletions
2
dnf-json
2
dnf-json
|
|
@ -255,7 +255,7 @@ log.info("Starting the dnf-json server")
|
|||
|
||||
LISTEN_FDS = int(os.environ.get("LISTEN_FDS", 0))
|
||||
|
||||
class SystemDActivationSocketServer(socketserver.UnixStreamServer):
|
||||
class SystemDActivationSocketServer(socketserver.ForkingMixIn, socketserver.UnixStreamServer):
|
||||
def server_bind(self):
|
||||
log.debug("service bind")
|
||||
assert LISTEN_FDS == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue