Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fall back to inotify_init if inotify_init1 does not work
Browse files Browse the repository at this point in the history
This fixes monitoring failing to work when glib is built on a 2.6.27+
kernel but run on an older one.

http://bugs.debian.org/544354
https://bugzilla.gnome.org/show_bug.cgi?id=593775
  • Loading branch information
Josselin Mouette committed Sep 23, 2009
1 parent 1a4763e commit cc4970c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gio/inotify/inotify-kernel.c
Expand Up @@ -193,8 +193,10 @@ gboolean _ik_startup (void (*cb)(ik_event_t *event))
#ifdef HAVE_INOTIFY_INIT1
inotify_instance_fd = inotify_init1 (IN_CLOEXEC);
#else
inotify_instance_fd = inotify_init ();
inotify_instance_fd = -1;
#endif
if (inotify_instance_fd < 0)
inotify_instance_fd = inotify_init ();

if (inotify_instance_fd < 0)
return FALSE;
Expand Down

0 comments on commit cc4970c

Please sign in to comment.