From 89318bbeb4076d8d9de9831d69621fc1411760d3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 May 2009 03:41:50 +0200 Subject: cloexec: set all sockets that are created with SOCK_CLOEXEC Since all socket users enable FD_CLOEXEC anyway we can just do that in _dbus_open_socket() and be done with it for all cases. By side effect this allows us to use SOCK_CLOEXEC and hence close the CLOEXEC race. --- dbus/dbus-server-unix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dbus/dbus-server-unix.c') diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c index 1dda5d19..86a64c86 100644 --- a/dbus/dbus-server-unix.c +++ b/dbus/dbus-server-unix.c @@ -201,8 +201,7 @@ _dbus_server_new_for_domain_socket (const char *path, } listen_fd = _dbus_listen_unix_socket (path, abstract, error); - _dbus_fd_set_close_on_exec (listen_fd); - + if (listen_fd < 0) { _DBUS_ASSERT_ERROR_IS_SET (error); -- cgit