gdesktopappinfo: enable fast posix_spawn gspawn codepath

Desktop / GNOME / GLib - Daniel Drake [endlessm.com] - 21 June 2018 16:44 EDT

In order to use the new posix_spawn gspawn codepath, for more robust app launching when available memory is low, we need to meet some conditions.

child_setup needs to be NULL for this optimization to work, so drop the internal child_setup that is used here. Replace it with a lightweight wrapper binary (gio-launch-desktop) that sets GIO_LAUNCHED_DESKTOP_FILE_PID before executing the app.

Adjust PATH for gio tests so that it can execute the new binary from the build directory.

742efe623 gdesktopappinfo: enable fast posix_spawn gspawn codepath
gio/Makefile.am | 4 +-
gio/gdesktopappinfo.c | 105 ++++++++++++++++++-----------------------------
gio/gio-launch-desktop.c | 52 +++++++++++++++++++++++
gio/meson.build | 6 +++
gio/tests/Makefile.am | 4 +-
gio/tests/meson.build | 1 +
6 files changed, 106 insertions(+), 66 deletions(-)

Upstream: git.gnome.org


  • Share