goption: [linux] Look in /proc/self/cmdline for argv0 if not specified
authorColin Walters <walters@verbum.org>
Fri, 25 Mar 2011 15:59:33 +0000 (11:59 -0400)
committerColin Walters <walters@verbum.org>
Thu, 31 Mar 2011 19:29:42 +0000 (15:29 -0400)
commit14bb138d581b40bbd850c85ae63c8391a1671696
treedc8bb23d188a916d2ab8d73ac34693eb6520a65d
parent131b9f98ea6ec1cc7b8dce539199d181ab1dac19
goption: [linux] Look in /proc/self/cmdline for argv0 if not specified

We really shouldn't use <unknown> when we can perfectly easily
get argv0 out of /proc.  This avoids people having to pass argv
down into gtk_init/g_option_context_parse etc., which is important
because GTK+ uses it to initialize the WM_CLASS, which in turn
GNOME Shell consumes for application tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=644309
glib/goption.c
glib/tests/Makefile.am
glib/tests/option-argv0.c [new file with mode: 0644]
glib/tests/option-context.c