From 26347a4c5538008318188118872490128f43fcd3 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 30 Oct 2009 12:31:59 +0100 Subject: use CLOEXEC flags instead of fcntl() --- udev/udev-watch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'udev/udev-watch.c') diff --git a/udev/udev-watch.c b/udev/udev-watch.c index 102e16f81d..d67083b51b 100644 --- a/udev/udev-watch.c +++ b/udev/udev-watch.c @@ -38,10 +38,8 @@ static int inotify_fd = -1; */ int udev_watch_init(struct udev *udev) { - inotify_fd = inotify_init(); - if (inotify_fd >= 0) - util_set_fd_cloexec(inotify_fd); - else + inotify_fd = inotify_init1(IN_CLOEXEC); + if (inotify_fd < 0) err(udev, "inotify_init failed: %m\n"); return inotify_fd; } -- cgit v1.2.3-54-g00ecf