Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Inotify binding

4 views
Skip to first unread message

Vincent Hanquez

unread,
Nov 21, 2006, 3:20:57 PM11/21/06
to caml...@yquem.inria.fr
Hi,

I've made a small bindings for inotify, aka linux file system notification
new subsystem.

It's available here:

http://tab.snarc.org/projects/ocaml_inotify/

or the archive is directly here:

http://tab.snarc.org/download/ocaml/ocaml_inotify-0.2.tar.bz2

You need a really recent glibc to have inotify syscall available
through /usr/include/sys/inotify.h. I didn't bother putting some code
to handle old glibc, but I accept patch :)

The archive contains an example program on how to use the interface.

Cheers,
--
Vincent Hanquez

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Richard Jones

unread,
Nov 21, 2006, 6:59:01 PM11/21/06
to Vincent Hanquez
On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
> I've made a small bindings for inotify, aka linux file system notification
> new subsystem.

I think OMake includes bindings for gamin. Or FAM which is the older
SGI-based daemon, but gamin is C API compatible with FAM.

http://svn.metaprl.org/viewvc/mojave/omake/src/clib/omake_notify.c?revision=1326&view=markup&pathrev=1326
http://www.gnome.org/~veillard/gamin/

Rich.

--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Internet Marketing and AdWords courses - http://merjis.com/courses - NEW!
Merjis blog - http://blog.merjis.com - NEW!

Vincent Hanquez

unread,
Nov 21, 2006, 7:18:52 PM11/21/06
to Richard Jones
On Tue, Nov 21, 2006 at 11:55:46PM +0000, Richard Jones wrote:
> On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
> > I've made a small bindings for inotify, aka linux file system notification
> > new subsystem.
>
> I think OMake includes bindings for gamin.

it seems to be talking FAM.

> Or FAM which is the older
> SGI-based daemon, but gamin is C API compatible with FAM.

Sounds more like a bad thing than a good thing to me.
Direct inotify binding are much smaller/simpler anyway.

Cheers,
--
Vincent Hanquez

Aleksey Nogin

unread,
Nov 29, 2006, 1:30:23 AM11/29/06
to Vincent Hanquez
On 21.11.2006 16:16, Vincent Hanquez wrote:

> On Tue, Nov 21, 2006 at 11:55:46PM +0000, Richard Jones wrote:
>> On Tue, Nov 21, 2006 at 09:18:34PM +0100, Vincent Hanquez wrote:
>>> I've made a small bindings for inotify, aka linux file system notification
>>> new subsystem.
>> I think OMake includes bindings for gamin.
>
> it seems to be talking FAM.

Actually, in our LibMojave (which is what OMake uses) we have bindings for:
- FAM
- Gamin (using either the generic FAM interface, or taking advantage of
Gamin extensions)
- kqueue (FreeBSD, OS X)
- inotify (Linux)
- ??? (Win32) - not sure what exactly is used there

In all five cases, we provide the _same_ fam-style interface on the
OCaml side. We also have OMake autoconf-style scripts that can detect
which of the fours notification mechanisms is present on a specific
machine and use the appropriate one.

> Sounds more like a bad thing than a good thing to me.
> Direct inotify binding are much smaller/simpler anyway.

That might be true, but only if you happen to be on a machine that
provides inotify. We do utilize inotify if it is present, but we also
have an option of using one of the other four when there is no inotify.

Aleksey

0 new messages