From 84080c64c5c209be1e0fd0f5e515812db6b19309 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 2 Jun 2017 10:13:26 +0200 Subject: [PATCH] spawn: Use CLOEXEC for pipes (#1811) Fixes: https://github.com/awesomeWM/awesome/issues/1193#issuecomment-305705724 Signed-off-by: Uli Schlachter --- awesomeConfig.cmake | 2 +- docs/01-readme.md | 2 +- spawn.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 6371551b..a2a9c860 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -123,7 +123,7 @@ pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED xcb>=1.6) set(AWESOME_DEPENDENCIES - glib-2.0 + glib-2.0>=2.40 gdk-pixbuf-2.0 cairo x11 diff --git a/docs/01-readme.md b/docs/01-readme.md index 5d5cdd6c..f687d40e 100644 --- a/docs/01-readme.md +++ b/docs/01-readme.md @@ -53,7 +53,7 @@ environment): introspection - [Pango](http://www.pango.org/) with support for Cairo and GObject introspection -- [GLib](https://wiki.gnome.org/Projects/GLib) with support for GObject +- [GLib >= 2.40](https://wiki.gnome.org/Projects/GLib) with support for GObject introspection - [GIO](https://developer.gnome.org/gio/stable/) with support for GObject introspection diff --git a/spawn.c b/spawn.c index 334ebcbd..0f1e6db1 100644 --- a/spawn.c +++ b/spawn.c @@ -498,7 +498,7 @@ luaA_spawn(lua_State *L) g_timeout_add_seconds(AWESOME_SPAWN_TIMEOUT, spawn_launchee_timeout, context); } - flags |= G_SPAWN_SEARCH_PATH; + flags |= G_SPAWN_SEARCH_PATH | G_SPAWN_CLOEXEC_PIPES; retval = g_spawn_async_with_pipes(NULL, argv, NULL, flags, spawn_callback, context, &pid, stdin_ptr, stdout_ptr, stderr_ptr, &error);