socket: set close on exec

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Uli Schlachter 2009-04-02 13:33:11 +02:00 committed by Julien Danjou
parent 9a7381d02a
commit 4722ba6c10
1 changed files with 2 additions and 0 deletions

View File

@ -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