From 1bcdb3aeac189512eb21d45549fc0c8387e86623 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 12 Jul 2023 13:14:09 -0700 Subject: [PATCH] libsysprof-profile: do not discard on cancel our subprocess wait --- src/libsysprof-profile/sysprof-recording.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-profile/sysprof-recording.c b/src/libsysprof-profile/sysprof-recording.c index 656a9982..74dd2afa 100644 --- a/src/libsysprof-profile/sysprof-recording.c +++ b/src/libsysprof-profile/sysprof-recording.c @@ -95,13 +95,16 @@ _sysprof_recording_spawn (SysprofSpawnable *spawnable) { g_autoptr(GSubprocess) subprocess = NULL; g_autoptr(GError) error = NULL; + DexFuture *ret; g_assert (SYSPROF_IS_SPAWNABLE (spawnable)); if (!(subprocess = sysprof_spawnable_spawn (spawnable, &error))) return dex_future_new_for_error (g_steal_pointer (&error)); - return dex_subprocess_wait_check (subprocess); + ret = dex_subprocess_wait_check (subprocess); + dex_async_pair_set_cancel_on_discard (DEX_ASYNC_PAIR (ret), FALSE); + return ret; } static inline void