mirror of
https://github.com/flatpak/flatpak.git
synced 2026-06-19 14:03:46 -04:00
common: Add GSubprocessFlags to flatpak_spawnv
This is useful to e.g. hide stderr
This commit is contained in:
@@ -304,7 +304,7 @@ builder_git_mirror_repo (const char *repo_location,
|
||||
g_ptr_array_add (args, filename_tmp);
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
res = flatpak_spawnv (parent, NULL, error,
|
||||
res = flatpak_spawnv (parent, NULL, 0, error,
|
||||
(const gchar * const *) args->pdata);
|
||||
|
||||
if (cached_git_dir && !update &&
|
||||
|
||||
@@ -383,7 +383,7 @@ unrpm (GFile *dir,
|
||||
rpm_path, /* shell's $1 */
|
||||
NULL };
|
||||
|
||||
res = flatpak_spawnv (dir, NULL, error, argv);
|
||||
res = flatpak_spawnv (dir, NULL, 0, error, argv);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ patch (GFile *dir,
|
||||
}
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
res = flatpak_spawnv (dir, NULL, error, (const char **) args->pdata);
|
||||
res = flatpak_spawnv (dir, NULL, 0, error, (const char **) args->pdata);
|
||||
|
||||
g_ptr_array_free (args, TRUE);
|
||||
|
||||
|
||||
@@ -1597,7 +1597,7 @@ builder_maybe_host_spawnv (GFile *dir,
|
||||
if (flatpak_is_in_sandbox ())
|
||||
return builder_host_spawnv (dir, output, error, argv);
|
||||
|
||||
return flatpak_spawnv (dir, output, error, argv);
|
||||
return flatpak_spawnv (dir, output, 0, error, argv);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -1956,7 +1956,7 @@ flatpak_spawn (GFile *dir,
|
||||
g_ptr_array_add (args, (gchar *) arg);
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
res = flatpak_spawnv (dir, output, error, (const gchar * const *) args->pdata);
|
||||
res = flatpak_spawnv (dir, output, 0, error, (const gchar * const *) args->pdata);
|
||||
|
||||
g_ptr_array_free (args, TRUE);
|
||||
|
||||
@@ -1966,6 +1966,7 @@ flatpak_spawn (GFile *dir,
|
||||
gboolean
|
||||
flatpak_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv)
|
||||
{
|
||||
@@ -1980,7 +1981,9 @@ flatpak_spawnv (GFile *dir,
|
||||
launcher = g_subprocess_launcher_new (0);
|
||||
|
||||
if (output)
|
||||
g_subprocess_launcher_set_flags (launcher, G_SUBPROCESS_FLAGS_STDOUT_PIPE);
|
||||
flags |= G_SUBPROCESS_FLAGS_STDOUT_PIPE;
|
||||
|
||||
g_subprocess_launcher_set_flags (launcher, flags);
|
||||
|
||||
if (dir)
|
||||
{
|
||||
|
||||
@@ -405,6 +405,7 @@ gboolean flatpak_spawn (GFile *dir,
|
||||
|
||||
gboolean flatpak_spawnv (GFile *dir,
|
||||
char **output,
|
||||
GSubprocessFlags flags,
|
||||
GError **error,
|
||||
const gchar * const *argv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user