summaryrefslogtreecommitdiff
path: root/udev/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-03-23 01:45:21 +0100
committerKay Sievers <kay.sievers@vrfy.org>2011-03-23 01:45:21 +0100
commit3c6ee190277f9d4bf39269fdb167f9c430633c9b (patch)
treebdb9996cb3e456f06605427b74e7ad343dc83467 /udev/udevd.c
parentcf3b3fbcd5c43bdc5e7e15189c71b62a36a1cf03 (diff)
udevd: initialize fds, for proper close() on exit
Diffstat (limited to 'udev/udevd.c')
-rw-r--r--udev/udevd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index 2a42dfa765..03cd2cbcee 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -75,7 +75,7 @@ static struct udev_rules *rules;
static struct udev_queue_export *udev_queue_export;
static struct udev_ctrl *udev_ctrl;
static struct udev_monitor *monitor;
-static int worker_watch[2];
+static int worker_watch[2] = { -1, -1 };
static pid_t settle_pid;
static bool stop_exec_queue;
static bool reload_config;
@@ -97,11 +97,11 @@ enum poll_fd {
};
static struct pollfd pfd[] = {
- [FD_NETLINK] = { .events = POLLIN },
- [FD_WORKER] = { .events = POLLIN },
- [FD_SIGNAL] = { .events = POLLIN },
- [FD_INOTIFY] = { .events = POLLIN },
- [FD_CONTROL] = { .events = POLLIN },
+ [FD_NETLINK] = { .events = POLLIN, .fd = -1 },
+ [FD_WORKER] = { .events = POLLIN, .fd = -1 },
+ [FD_SIGNAL] = { .events = POLLIN, .fd = -1 },
+ [FD_INOTIFY] = { .events = POLLIN, .fd = -1 },
+ [FD_CONTROL] = { .events = POLLIN, .fd = -1 },
};
enum event_state {