patches/gdm-14-pstack.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 18225 b45d97b2f2c6
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18225
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     1
--- gdm-2.29.1/common/gdm-crash-logger.c-orig	2009-12-07 00:06:31.434330787 -0600
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     2
+++ gdm-2.29.1/common/gdm-crash-logger.c	2009-12-07 00:19:04.827522143 -0600
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     3
@@ -41,18 +41,19 @@ int main (int argc, char ** argv)
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     4
         gboolean        done;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     5
         GError         *error;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     6
         int             options;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     7
-        char *  args[] = { "gdb",
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     8
-                           "--batch",
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     9
-                           "--quiet",
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    10
-                           "--command=" DATADIR "/gdm/gdb-cmd",
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    11
-                           NULL,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    12
-                           NULL };
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    13
+        char           *cmd;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    14
+        char          **cmd_argv;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    15
+        int             cmd_argc;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    16
+
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    17
+        cmd = g_strdup_printf ("/usr/bin/pstack %d\"", getppid ());
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    18
+
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    19
+        if (! g_shell_parse_argv (cmd, &cmd_argc, &cmd_argv, NULL)) {
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    20
+                exit (1);
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    21
+        }
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    22
 
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    23
-        snprintf (gdm_pid, sizeof (gdm_pid), "--pid=%d", getppid ());
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    24
-        args[4] = &gdm_pid[0];
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    25
         error = NULL;
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    26
         res = g_spawn_async_with_pipes (NULL,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    27
-                                        args,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    28
+                                        cmd_argv,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    29
                                         NULL,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    30
                                         G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
b45d97b2f2c6 2010-07-13 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    31
                                         NULL,