From: Jérémie Galarneau Date: Fri, 11 Jan 2019 20:49:44 +0000 (-0500) Subject: Fix: leak of sessiond configuration on launch of run-as worker X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=929f71ec24b58045319473f050a7f235f726ec78;hp=929f71ec24b58045319473f050a7f235f726ec78 Fix: leak of sessiond configuration on launch of run-as worker The run-as worker is spawned through fork() without using exec*(). This means that any resource allocated by the session daemon before the launch of the run-as worker will be leaked in the run-as worker's process. A callback is added to the run_as launch interface to allow users a chance to clean-up after the fork occurs. This mechanism is fragile as it may not always be easy (or possible) to track all such resources in the future. This makes a strong argument for using a new process image (through exec*()) and forego any such problem at some point. The lttng-consumerd from a similar (and more severe) problem with its own run-as worker. A fix adressing the consumerd's problem follows. Signed-off-by: Jérémie Galarneau ---