mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
sysprof: use flatpak-spawn when inside of flatpak
Unless the argv already is calling flatpak-spawn, try to run the process through the host using flatpak-spawn.
This commit is contained in:
@ -521,6 +521,15 @@ sysprof_recording_template_apply (SysprofRecordingTemplate *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
spawnable = sysprof_spawnable_new ();
|
spawnable = sysprof_spawnable_new ();
|
||||||
|
|
||||||
|
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS) &&
|
||||||
|
!g_strv_contains ((const char * const *)argv, "flatpak-spawn"))
|
||||||
|
{
|
||||||
|
sysprof_spawnable_append_argv (spawnable, "flatpak-spawn");
|
||||||
|
sysprof_spawnable_append_argv (spawnable, "--host");
|
||||||
|
sysprof_spawnable_append_argv (spawnable, "--watch-bus");
|
||||||
|
}
|
||||||
|
|
||||||
sysprof_spawnable_append_args (spawnable, (const char * const *)argv);
|
sysprof_spawnable_append_args (spawnable, (const char * const *)argv);
|
||||||
|
|
||||||
if (self->cwd && self->cwd[0])
|
if (self->cwd && self->cwd[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user