Let child process handle SIGINT in flatpak enter

Otherwise when running software that handles SIGINT, such as gdb or
python, pressing ^C would kill flatpak-enter and return control to the
shell.
This commit is contained in:
Alicia Boya García
2021-03-05 19:10:11 +01:00
committed by Alexander Larsson
parent 79a91b5cf6
commit f39287d47f

View File

@@ -283,6 +283,7 @@ flatpak_builtin_enter (int argc,
g_ptr_array_add (argv_array, g_strdup (argv[rest_argv_start + i]));
g_ptr_array_add (argv_array, NULL);
signal (SIGINT, SIG_IGN);
if (!g_spawn_sync (NULL, (char **) argv_array->pdata, (char **) envp_array->pdata,
G_SPAWN_SEARCH_PATH_FROM_ENVP | G_SPAWN_CHILD_INHERITS_STDIN,
NULL, NULL,