Bug 23957

Summary: dbus inotify regression
Product: dbus Reporter: Adrian Bunk <bunk>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: normal    
Priority: medium CC: mclasen, walters
Version: 1.2.x   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-Bug-23957-Support-inotify-on-older-kernels.patch

Description Adrian Bunk 2009-09-15 04:20:29 UTC
After commit f4e15893e5be6da6c7642bb7ef9b14d5531afe41 (Bug 22516 - Ensure inotify fd is set close on exec) the code in bus/dir-watch-inotify.c is as follows:

#ifdef HAVE_INOTIFY_INIT1
     inotify_fd = inotify_init1 (IN_CLOEXEC);
#else
     inotify_fd = inotify_init ();
#endif
     if (inotify_fd <= 0) {
      _dbus_warn ("Cannot initialize inotify\n");
      goto out;
     } 

This does break when compiling with a recent userspace and then using an older kernel.

The fix from https://bugzilla.gnome.org/show_bug.cgi?id=593775 (same bug in glib) can also be used here.
Comment 1 Colin Walters 2009-10-16 10:26:07 UTC
Created attachment 30484 [details] [review]
0001-Bug-23957-Support-inotify-on-older-kernels.patch
Comment 2 Lennart Poettering 2009-10-16 17:54:09 UTC
Looks good to me!
Comment 3 Colin Walters 2010-03-16 09:22:21 UTC
This one got lost, but I just rebased it to dbus-1.2 and pushed there.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.