From 45e12acd75f9316a0c1214628bcb7bcb9521a77f Mon Sep 17 00:00:00 2001 From: pcg Date: Sun, 4 Apr 2004 23:52:37 +0000 Subject: [PATCH] *** empty log message *** --- src/rxvtd.C | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rxvtd.C b/src/rxvtd.C index dbb2051c..f0330ffc 100644 --- a/src/rxvtd.C +++ b/src/rxvtd.C @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -52,6 +53,8 @@ unix_listener::unix_listener (const char *sockname) exit (EXIT_FAILURE); } + fcntl (fd, F_SETFD, FD_CLOEXEC); + sockaddr_un sa; sa.sun_family = AF_UNIX; @@ -83,7 +86,10 @@ void unix_listener::accept_cb (io_watcher &w, short revents) int fd2 = accept (fd, 0, 0); if (fd2 >= 0) - new server (fd2); + { + fcntl (fd2, F_SETFD, FD_CLOEXEC); + new server (fd2); + } } void server::log_msg (const char *msg) -- 2.34.1