mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
main: Move g_setenv() calls before calls that may start threads
setenv() is not thread-safe and must happen before starting threads. The
g_setenv() calls in main() happened after meta_context_configure(),
which will start a thread via meta_profiler_new() which in its init
calls g_bus_get().
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6974
Part-of:
<https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3018>
(cherry picked from commit 8d7dc098b1)
This commit is contained in:
parent
18f288bb51
commit
a03769c207
1 changed files with 6 additions and 6 deletions
12
src/main.c
12
src/main.c
|
|
@ -609,6 +609,12 @@ main (int argc, char **argv)
|
|||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
/* FIXME: Add gjs API to set this stuff and don't depend on the
|
||||
* environment. These propagate to child processes.
|
||||
*/
|
||||
g_setenv ("GJS_DEBUG_OUTPUT", "stderr", TRUE);
|
||||
g_setenv ("GJS_DEBUG_TOPICS", "JS ERROR;JS LOG", TRUE);
|
||||
|
||||
context = meta_create_context (WM_NAME);
|
||||
meta_context_add_option_entries (context, gnome_shell_options,
|
||||
GETTEXT_PACKAGE);
|
||||
|
|
@ -634,12 +640,6 @@ main (int argc, char **argv)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* FIXME: Add gjs API to set this stuff and don't depend on the
|
||||
* environment. These propagate to child processes.
|
||||
*/
|
||||
g_setenv ("GJS_DEBUG_OUTPUT", "stderr", TRUE);
|
||||
g_setenv ("GJS_DEBUG_TOPICS", "JS ERROR;JS LOG", TRUE);
|
||||
|
||||
shell_init_debug (g_getenv ("SHELL_DEBUG"));
|
||||
|
||||
shell_dbus_init (meta_context_is_replacing (context));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue