Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 693297 Details for
Bug 902010
system-config-users does not work from main menu
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Avoid-double-forking-when-launching-apps-it-breaks
mate-panel_Avoid-double-forking-when-launching-apps-it-breaks.patch (text/plain), 4.46 KB, created by
Wolfgang Ulbrich
on 2013-02-05 10:17:20 UTC
(
hide
)
Description:
Avoid-double-forking-when-launching-apps-it-breaks
Filename:
MIME Type:
Creator:
Wolfgang Ulbrich
Created:
2013-02-05 10:17:20 UTC
Size:
4.46 KB
patch
obsolete
>diff -upr mate-panel-1.5.4-orig/mate-panel/libpanel-util/panel-launch.c mate-panel-1.5.4/mate-panel/libpanel-util/panel-launch.c >--- mate-panel-1.5.4-orig/mate-panel/libpanel-util/panel-launch.c 2013-01-20 21:32:40.000000000 +0100 >+++ mate-panel-1.5.4/mate-panel/libpanel-util/panel-launch.c 2013-02-05 01:26:28.724936984 +0100 >@@ -75,6 +75,25 @@ _panel_launch_handle_error (const gchar > return FALSE; > } > >+static void >+dummy_child_watch (GPid pid, >+ gint status, >+ gpointer user_data) >+{ >+ /* Nothing, this is just to ensure we don't double fork >+ * and break pkexec: >+ * https://bugzilla.gnome.org/show_bug.cgi?id=675789 >+ */ >+} >+ >+static void >+gather_pid_callback (GDesktopAppInfo *gapp, >+ GPid pid, >+ gpointer data) >+{ >+ g_child_watch_add (pid, dummy_child_watch, NULL); >+} >+ > gboolean > panel_app_info_launch_uris (GAppInfo *appinfo, > GList *uris, >@@ -86,7 +105,7 @@ panel_app_info_launch_uris (GAppInfo * > GError *local_error; > gboolean retval; > >- g_return_val_if_fail (G_IS_APP_INFO (appinfo), FALSE); >+ g_return_val_if_fail (G_IS_DESKTOP_APP_INFO (appinfo), FALSE); > g_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE); > g_return_val_if_fail (error == NULL || *error == NULL, FALSE); > >@@ -95,16 +114,18 @@ panel_app_info_launch_uris (GAppInfo * > gdk_app_launch_context_set_timestamp (context, timestamp); > > local_error = NULL; >- retval = g_app_info_launch_uris (appinfo, uris, >- (GAppLaunchContext *) context, >- &local_error); >+ retval = g_desktop_app_info_launch_uris_as_manager ((GDesktopAppInfo*)appinfo, uris, >+ (GAppLaunchContext *) context, >+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, >+ NULL, NULL, gather_pid_callback, appinfo, >+ &local_error); > > g_object_unref (context); > > if ((local_error == NULL) && (retval == TRUE)) > return TRUE; > >- return _panel_launch_handle_error (g_app_info_get_name (appinfo), >+ return _panel_launch_handle_error (g_app_info_get_name ((GAppInfo*) appinfo), > screen, local_error, error); > } > >@@ -209,6 +230,7 @@ panel_launch_desktop_file_with_fallback > char *argv[2] = { (char *) fallback_exec, NULL }; > GError *local_error; > gboolean retval; >+ GPid pid; > > g_return_val_if_fail (desktop_file != NULL, FALSE); > g_return_val_if_fail (fallback_exec != NULL, FALSE); >@@ -226,10 +248,12 @@ panel_launch_desktop_file_with_fallback > } > > retval = gdk_spawn_on_screen (screen, NULL, argv, NULL, >- G_SPAWN_SEARCH_PATH, >- NULL, NULL, NULL, &local_error); >+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, >+ NULL, NULL, &pid, &local_error); > >- if (local_error == NULL && retval == TRUE) >+ if (local_error == NULL && retval == TRUE) { >+ g_child_watch_add (pid, dummy_child_watch, NULL); >+ } > return TRUE; > > return _panel_launch_handle_error (fallback_exec, >diff -upr mate-panel-1.5.4-orig/mate-panel/panel-run-dialog.c mate-panel-1.5.4/mate-panel/panel-run-dialog.c >--- mate-panel-1.5.4-orig/mate-panel/panel-run-dialog.c 2013-01-20 21:32:40.000000000 +0100 >+++ mate-panel-1.5.4/mate-panel/panel-run-dialog.c 2013-02-05 01:01:16.006055899 +0100 >@@ -349,6 +349,17 @@ command_is_executable (const char *com > return TRUE; > } > >+static void >+dummy_child_watch (GPid pid, >+ gint status, >+ gpointer user_data) >+{ >+ /* Nothing, this is just to ensure we don't double fork >+ * and break pkexec: >+ * https://bugzilla.gnome.org/show_bug.cgi?id=675789 >+ */ >+} >+ > static gboolean > panel_run_dialog_launch_command (PanelRunDialog *dialog, > const char *command, >@@ -359,6 +370,7 @@ panel_run_dialog_launch_command (PanelRu > GError *error = NULL; > char **argv; > int argc; >+ GPid pid; > > if (!command_is_executable (locale_command, &argc, &argv)) > return FALSE; >@@ -372,10 +384,10 @@ panel_run_dialog_launch_command (PanelRu > NULL, /* working directory */ > argv, > NULL, /* envp */ >- G_SPAWN_SEARCH_PATH, >+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, > NULL, /* child setup func */ > NULL, /* user data */ >- NULL, /* child pid */ >+ &pid, /* child pid */ > &error); > > if (!result) { >@@ -389,6 +401,8 @@ panel_run_dialog_launch_command (PanelRu > g_free (primary); > > g_error_free (error); >+ } else { >+ g_child_watch_add (pid, dummy_child_watch, NULL); > } > > g_strfreev (argv);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 902010
: 693297