/* Since: 2.40 Returns: (transfer full): A new #GSubprocess, or NULL on error (and @error will be set)  */
GSubprocess* g_subprocess_launcher_spawn(GSubprocessLauncher *launcher, GError **error, const gchar *argv0,...)
/* Since: 2.40 Returns: (transfer full): A new #GSubprocess, or NULL on error (and @error will be set)  */
GSubprocess* g_subprocess_launcher_spawn(GSubprocessLauncher *launcher, GError **error, const gchar *argv0,...)
{
  GSubprocess *result;
  GPtrArray *args;
  const gchar *arg;
  va_list ap;
  g_return_val_if_fail (argv0 != NULL && argv0[0] != '\0', NULL);
  g_return_val_if_fail (error == NULL || *error == NULL, NULL);
  args = g_ptr_array_new ();
  va_start (ap, argv0);
  g_ptr_array_add (args, (gchar *) argv0);
  while ((arg = va_arg (ap, const gchar *)))
    g_ptr_array_add (args, (gchar *) arg);
  g_ptr_array_add (args, NULL);
  va_end (ap);
  result = g_subprocess_launcher_spawnv (launcher, (const gchar * const *) args->pdata, error);
  g_ptr_array_free (args, TRUE);
  return result;
}