libsysprof: abstract subprocess usage

For embedding cases, we need a bit more control here so that the
application can be in control of how the process is spawned.
This commit is contained in:
Christian Hergert
2019-06-11 18:47:07 -07:00
parent 19c2791198
commit e97490be16
9 changed files with 400 additions and 49 deletions

View File

@ -32,12 +32,11 @@ struct _SysprofGjsSource
static SysprofSourceInterface *parent_iface;
static void
sysprof_gjs_source_modify_spawn (SysprofSource *source,
GSubprocessLauncher *launcher,
GPtrArray *argv)
sysprof_gjs_source_modify_spawn (SysprofSource *source,
SysprofSpawnable *spawnable)
{
g_subprocess_launcher_setenv (launcher, "GJS_ENABLE_PROFILER", "1", FALSE);
parent_iface->modify_spawn (source, launcher, argv);
sysprof_spawnable_setenv (spawnable, "GJS_ENABLE_PROFILER", "1");
parent_iface->modify_spawn (source, spawnable);
}
static void