libsysprof-profile: do not discard on cancel our subprocess wait

This commit is contained in:
Christian Hergert
2023-07-12 13:14:09 -07:00
parent 1f4f4d7e50
commit 1bcdb3aeac

View File

@ -95,13 +95,16 @@ _sysprof_recording_spawn (SysprofSpawnable *spawnable)
{ {
g_autoptr(GSubprocess) subprocess = NULL; g_autoptr(GSubprocess) subprocess = NULL;
g_autoptr(GError) error = NULL; g_autoptr(GError) error = NULL;
DexFuture *ret;
g_assert (SYSPROF_IS_SPAWNABLE (spawnable)); g_assert (SYSPROF_IS_SPAWNABLE (spawnable));
if (!(subprocess = sysprof_spawnable_spawn (spawnable, &error))) if (!(subprocess = sysprof_spawnable_spawn (spawnable, &error)))
return dex_future_new_for_error (g_steal_pointer (&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 static inline void