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

@ -141,16 +141,14 @@ sysprof_source_stop (SysprofSource *self)
}
void
sysprof_source_modify_spawn (SysprofSource *self,
GSubprocessLauncher *launcher,
GPtrArray *argv)
sysprof_source_modify_spawn (SysprofSource *self,
SysprofSpawnable *spawnable)
{
g_return_if_fail (SYSPROF_IS_SOURCE (self));
g_return_if_fail (G_IS_SUBPROCESS_LAUNCHER (launcher));
g_return_if_fail (argv != NULL);
g_return_if_fail (SYSPROF_IS_SPAWNABLE (spawnable));
if (SYSPROF_SOURCE_GET_IFACE (self)->modify_spawn)
SYSPROF_SOURCE_GET_IFACE (self)->modify_spawn (self, launcher, argv);
SYSPROF_SOURCE_GET_IFACE (self)->modify_spawn (self, spawnable);
}
void