Go to file
Daniel Drake 4b522a02c3 shell-app: remove child_setup from app launching
When the amount of free memory on the system is somewhat low, gnome-shell
will sometimes fail to launch apps, reporting the error:
  fork(): Cannot allocate memory

fork() is failing here because while cloning the process virtual address
space, Linux worries that the thread being forked may end up COWing the
entire address space of the parent process (gnome-shell, which is
memory-hungry), and there is not enough free memory to permit that to
happen. This check is somewhat irrelevant because we are only forking
to immediately exec(), which will discard the whole virtual address
space anyway.

This issue can be avoided by using a new optimized gspawn codepath in
the latest glib development version, which uses posix_spawn() internally.

For the optimized codepath to be used, we must not pass a child_setup
function, so the the file descriptor management is reimplemented here
using new glib API to pass fds to the child process. The old API will
continue to be used on older glib versions.

We must also change the spawn flags for this code path to be hit.
I checked that gnome-shell's open file descriptors are all CLOEXEC
so using G_SPAWN_LEAVE_DESCRIPTORS_OPEN should be safe.

This will result in more resilient app launching when memory is low,
since the optimized spawn path avoids cloning the virtual address
space of the parent process (gnome-shell) and avoids the irrelevant
memory overcommit check.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/132
2018-07-30 23:11:41 +00:00
.settings Convert all JS style to be uniform, add Eclipse settings bits 2008-11-28 20:12:20 +00:00
browser-plugin docs: Use Markdown 2018-05-23 19:03:01 +02:00
data screenshot: Add PickColor() method to Screenshot interface 2018-07-30 16:55:10 +00:00
docs/reference build: Drop autotools support 2017-08-10 20:16:06 +02:00
js windowManager: Make workspace switching gestures follow motion 2018-07-30 21:20:52 +00:00
man man: Update project website 2018-01-07 21:39:18 +01:00
meson build: Run postinstall script where necessary 2018-04-09 19:19:33 +00:00
po Updated Spanish translation 2018-07-27 13:38:45 +02:00
src shell-app: remove child_setup from app launching 2018-07-30 23:11:41 +00:00
subprojects build: Update gvc to support renamed options 2018-01-30 13:37:38 +01:00
tests utils: Simplify URL regex to only support one layer of parentheses 2018-04-13 18:15:44 +00:00
tools/build tools: Remove obsolete check-for-missing script 2017-09-30 03:18:55 +02:00
.gitignore data: Add README and supporting script to update keyboard layouts from CLDR 2018-02-05 17:46:57 +01:00
.gitmodules theme: Replace gnome-shell-sass submodule with subtree 2018-02-09 21:45:09 +00:00
.project Convert all JS style to be uniform, add Eclipse settings bits 2008-11-28 20:12:20 +00:00
config.h.meson shell-app: remove child_setup from app launching 2018-07-30 23:11:41 +00:00
COPYING Changed obsolete FSF postal address. 2014-01-08 04:35:14 +07:00
gnome-shell.doap doap: add <programming-language> 2014-07-31 17:48:46 +02:00
HACKING.md docs: Use Markdown 2018-05-23 19:03:01 +02:00
meson_options.txt build: Stop detecting features automatically 2017-11-30 00:24:53 +01:00
meson.build shell-app: remove child_setup from app launching 2018-07-30 23:11:41 +00:00
NEWS Bump version to 3.29.4 2018-07-18 17:46:36 +02:00
README.md docs: Use Markdown 2018-05-23 19:03:01 +02:00

GNOME Shell

GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.

For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the [project wiki][wiki]

Bugs should be reported to the GNOME bug tracking system.

License

GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.