summaryrefslogtreecommitdiffhomepage
path: root/ubus.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-29 23:08:01 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-10-29 23:08:01 +0100
commitc173c610044890c539584f3beb927e71ff83c198 (patch)
treeacdedacb864ba6bbabe6bc928ed83a0dc22b78be /ubus.c
parenta9fd870450e82f31cba681651656276dfc1c39ac (diff)
use FD_CLOEXEC instead of tracking lists of fds
Diffstat (limited to 'ubus.c')
-rw-r--r--ubus.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ubus.c b/ubus.c
index 3ea71bf..7b85930 100644
--- a/ubus.c
+++ b/ubus.c
@@ -25,7 +25,6 @@
static struct ubus_context *ctx = NULL;
static struct blob_buf b;
-static struct netifd_fd ubus_fd;
static const char *ubus_path;
/* global object */
@@ -258,8 +257,7 @@ static void
netifd_ubus_add_fd(void)
{
ubus_add_uloop(ctx);
- ubus_fd.fd = ctx->sock.fd;
- netifd_fd_add(&ubus_fd);
+ system_fd_set_cloexec(ctx->sock.fd);
}
static void
@@ -283,7 +281,6 @@ netifd_ubus_reconnect_timer(struct uloop_timeout *timeout)
static void
netifd_ubus_connection_lost(struct ubus_context *ctx)
{
- netifd_fd_delete(&ubus_fd);
netifd_ubus_reconnect_timer(NULL);
}