From 3339bbbf9ee58d4562ed008ce45c5af7fbe222c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Thu, 20 Feb 2014 12:01:52 +0100 Subject: Mark the X socket as to be closed on exec. * Avoids leaking a descriptor, and potential problems described in the comp.windows.x FAQ. --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index 9a791ad..e2cea15 100644 --- a/src/main.c +++ b/src/main.c @@ -662,6 +662,8 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } + set_close_on_exec (ConnectionNumber (dpy)); + /* Set ratpoison specific Atoms. */ rp_command = XInternAtom (dpy, "RP_COMMAND", False); rp_command_request = XInternAtom (dpy, "RP_COMMAND_REQUEST", False); -- cgit v1.2.3