[gnome-settings-daemon] common: Print a debug message when launching a command



commit 7e953629f4594700b45e12c2c26da9282b91cc84
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 1 16:23:19 2013 +0200

    common: Print a debug message when launching a command
    
    So as to ease debugging.

 plugins/common/gsd-input-helper.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index d5d2a2a..fc4f10c 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -504,6 +504,7 @@ run_custom_command (GdkDevice              *device,
         int exit_status;
         gboolean rc;
         int id;
+        char *out;
 
         settings = g_settings_new (INPUT_DEVICES_SCHEMA);
         cmd = g_settings_get_string (settings, KEY_HOTPLUG_COMMAND);
@@ -525,6 +526,10 @@ run_custom_command (GdkDevice              *device,
         argv[5] = (char*) gdk_device_get_name (device);
         argv[6] = NULL;
 
+        out = g_strjoinv (" ", argv);
+        g_debug ("About to launch command: %s", out);
+        g_free (out);
+
         rc = g_spawn_sync (g_get_home_dir (), argv, NULL, G_SPAWN_SEARCH_PATH,
                            NULL, NULL, NULL, NULL, &exit_status, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]