From 6ab9df35ed442569139c9f64ee055c9622a753e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 29 Sep 2024 04:13:32 +0200 Subject: [PATCH] libsysprof: Kill `dbus-monitor` after D-Bus capturing is done Previously, the `dbus-monitor` process was never terminated. Unfortunately, tying up some memory is not the worst consequence of this: after some time file descriptors that are sent on the bus start to accumulate. This can be especially problematic when there are unexpected read/write ends of pipes. --- src/libsysprof/sysprof-dbus-monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsysprof/sysprof-dbus-monitor.c b/src/libsysprof/sysprof-dbus-monitor.c index d1da301e..2dcd8153 100644 --- a/src/libsysprof/sysprof-dbus-monitor.c +++ b/src/libsysprof/sysprof-dbus-monitor.c @@ -216,6 +216,8 @@ sysprof_dbus_monitor_record_fiber (gpointer user_data) } } + g_subprocess_force_exit (subprocess); + return dex_future_new_for_boolean (TRUE); }