gnome-shell/config.h.meson

33 lines
899 B
Plaintext
Raw Normal View History

/* The prefix for our gettext translation domains. */
#mesondefine GETTEXT_PACKAGE
/* Version number of package */
#mesondefine VERSION
/* Version number of package */
#mesondefine PACKAGE_VERSION
/* Define to 1 if you have the `fdwalk' function. */
#mesondefine HAVE_FDWALK
/* Define to 1 if you have the `mallinfo' function. */
#mesondefine HAVE_MALLINFO
/* Define to 1 fi you have the <sys/resource.h> header file. */
#mesondefine HAVE_SYS_RESOURCE_H
/* Define if we have NetworkManager */
#mesondefine HAVE_NETWORKMANAGER
/* Define if we have systemd */
#mesondefine HAVE_SYSTEMD
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
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-06-06 09:07:17 -04:00
/* Define if you have the `g_desktop_app_info_launch_uris_as_manager_with_fds` function */
#mesondefine HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS
/* Define if fdwalk is available in libc */
#mesondefine HAVE_FDWALK