gdesktopappinfo: add g_desktop_app_info_launch_uris_as_manager_with_fds variant

Add an app-launching function which allows standard file descriptors
to be passed to the child process.

This will be used by gnome-shell to pass systemd journal descriptors
as stdout/stderr. gnome-shell's child_setup function can then be
eliminated, which will enable use of the posix_spawn optimized
gspawn codepath for desktop app launching.
This commit is contained in:
Daniel Drake
2018-06-06 06:59:59 -06:00
parent 742efe6232
commit 156d009696
4 changed files with 143 additions and 19 deletions

View File

@@ -169,6 +169,20 @@ gboolean g_desktop_app_info_launch_uris_as_manager (GDesktopAppInfo
gpointer pid_callback_data,
GError **error);
GLIB_AVAILABLE_IN_2_58
gboolean g_desktop_app_info_launch_uris_as_manager_with_fds (GDesktopAppInfo *appinfo,
GList *uris,
GAppLaunchContext *launch_context,
GSpawnFlags spawn_flags,
GSpawnChildSetupFunc user_setup,
gpointer user_setup_data,
GDesktopAppLaunchCallback pid_callback,
gpointer pid_callback_data,
gint stdin_fd,
gint stdout_fd,
gint stderr_fd,
GError **error);
GLIB_AVAILABLE_IN_2_40
gchar *** g_desktop_app_info_search (const gchar *search_string);