Signed-off-by: Uli Schlachter <psyc...@znc.in> --- awesome.c | 4 ++++ luaa.c | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/awesome.c b/awesome.c index 26bd86c..507fcbe 100644 --- a/awesome.c +++ b/awesome.c @@ -44,6 +44,7 @@ #include "common/version.h" #include "common/atoms.h" #include "common/xcursor.h" +#include "common/socket.h" #include "config.h" awesome_t globalconf; @@ -442,6 +443,9 @@ main(int argc, char **argv) ev_check_start(globalconf.loop, &xcheck); ev_unref(globalconf.loop); + /* Mark the file descriptor for the X connection as close-on-exec */ + socket_close_on_exec(xfd); + /* Allocate a handler which will holds all errors and events */ xcb_event_handlers_init(globalconf.connection, &globalconf.evenths); xutil_error_handler_catch_all_set(&globalconf.evenths, xerrorstart, NULL); diff --git a/luaa.c b/luaa.c index afe249e..f624841 100644 --- a/luaa.c +++ b/luaa.c @@ -623,8 +623,6 @@ luaA_spawn(lua_State *L) { if(fork() == 0) { - if(globalconf.connection) - xcb_disconnect(globalconf.connection); setsid(); a_exec(cmd); warn("execl '%s' failed: %s\n", cmd, strerror(errno)); -- 1.6.2.1 -- "Do you know that books smell like nutmeg or some spice from a foreign land?" -- Faber in Fahrenheit 451 -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.