From 4722ba6c100208c90071d834fee9b94b537e7352 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 2 Apr 2009 13:33:11 +0200 Subject: [PATCH] socket: set close on exec Signed-off-by: Uli Schlachter Signed-off-by: Julien Danjou --- common/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/socket.c b/common/socket.c index 80e1438a4..bbb977590 100644 --- a/common/socket.c +++ b/common/socket.c @@ -121,6 +121,8 @@ socket_getclient(void) if(csfd < 0) warn("error opening UNIX domain socket: %s", strerror(errno)); + fd_set_close_on_exec(csfd); + return csfd; } // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80