mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
shell-app: Do not allocate memory during GSpawnChildSetupFunc
The child context setup function used as launch GSpawnChildSetupFunc
uses g_object_get that internally potentially allocates memory, making
it not async-signal-safe and so not something that is safe to use in
between fork and exec, so just use the simpler getter here.
Note that the current implementation of app_child_setup() is safe
already as sd_journal_stream_fd, dup2 and close are so.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3293>
(cherry picked from commit dcb5956dea)
This commit is contained in:
parent
85162f9af3
commit
4424db5a44
1 changed files with 1 additions and 2 deletions
|
|
@ -1296,9 +1296,8 @@ static void
|
|||
child_context_setup (gpointer user_data)
|
||||
{
|
||||
ShellGlobal *shell_global = user_data;
|
||||
MetaContext *meta_context;
|
||||
MetaContext *meta_context = shell_global_get_context (shell_global);
|
||||
|
||||
g_object_get (shell_global, "context", &meta_context, NULL);
|
||||
meta_context_restore_rlimit_nofile (meta_context, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue